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| Name | Type | Default | Description |
|---|---|---|---|
turns | StreamChatTurn[] | DEFAULT_TURNS | The conversations, played one at a time. |
title | string | "Assistant" | The name in the top bar. |
speed | number | 14 | Words per second while the reply streams. |
hold | number | 2600 | Milliseconds to wait after a turn before the next one starts. |
loop | boolean | true | Plays on to the next turn on its own. |
autoplay | boolean | true | Starts when the scene scrolls into view; when off it waits for a chip or replay. |
height | number | 360 | The height of the scene in px. |
width | number | 560 | The widest the scene grows, in px. It shrinks to fit a narrower parent. |
replayLabel | string | "Replay" | What screen readers call the replay button. |
turn | number | None | The turn on screen, as an index, when you control it. |
defaultTurn | number | 0 | The turn the scene opens on when you do not control it. |
onTurnChange | (index: number) => void | None | Called with the index when the turn changes. |
className | string | None |