Skip to content
PixiKit

Stream Chat

A small self-playing scene of an assistant answering a question: the reply streams in word by word, a result card draws in, and chips switch between conversations.

pixikit.com/docs/blocks/illustrations/stream-chat

Customize

Speed14words/s
Hold2600ms
Loop
Autoplay
Height360px
Width560px

Props

13
NameTypeDefaultDescription
turnsStreamChatTurn[]DEFAULT_TURNSThe conversations, played one at a time.
titlestring"Assistant"The name in the top bar.
speednumber14Words per second while the reply streams.
holdnumber2600Milliseconds to wait after a turn before the next one starts.
loopbooleantruePlays on to the next turn on its own.
autoplaybooleantrueStarts when the scene scrolls into view; when off it waits for a chip or replay.
heightnumber360The height of the scene in px.
widthnumber560The widest the scene grows, in px. It shrinks to fit a narrower parent.
replayLabelstring"Replay"What screen readers call the replay button.
turnnumberNoneThe turn on screen, as an index, when you control it.
defaultTurnnumber0The turn the scene opens on when you do not control it.
onTurnChange(index: number) => voidNoneCalled with the index when the turn changes.
classNamestringNone

More illustrations blocks in Pro

View all

Related