← Inventory
StreamingText
Progressive streaming answer with settle-gated chrome.
Usage
import { StreamingText, StreamingTextDemo, StreamingTextProps, StreamingTextSource, StreamingTextToken } from "@desk/ui/components/streaming-text";Best practices
Drive
tokensfrom real stream deltas — don't fake a word clock in product code. Showcase demos may animate.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | ||
| tokens | StreamingTextToken[] | Tokens revealed so far (controlled). | |
| streaming | boolean | Whether the stream is still open. | |
| sources | StreamingTextSource[] | Sources for the stacked avatars + disclosure. | |
| sourceCount | number | Source count label (may exceed | |
| followUps | string[] | Follow-up prompts revealed after settle. | |
| onFollowUp | (text: string) => void | Called when a follow-up is chosen. | |
| actions | ReactNode | Optional action icons rendered after settle. |
Also exports
- component
StreamingTextDemo - interface
StreamingTextProps - interface
StreamingTextSource - interface
StreamingTextToken
Composition
Builds on