Skip to content
Design System
GitHub

A model's answer streaming token by token under a calm status row (queue, Generating with Stop, Done, Stopped, Failed), with reasoning kept apart and screen readers hearing whole sentences.

API reference

Generated from the types. Every part also takes className.

StreamingText

textrequired
stringThe answer so far. Append each chunk to it. As plain text (blank lines start paragraphs), or Markdown with format.
format
"text" | "markdown" = "text""text" (default): plain text, nothing parsed. "markdown": rendered with the kit's Markdown as it streams, read without its syntax.
markdownProps
Omit<MarkdownProps, "text" | "streaming">Markdown's options with format="markdown": cite for citation markers, headingLevel, imageOrigins, labels.
phaserequired
"done" | "error" | "streaming" | "queued" | "stopped"
queuePosition
numberWhile queued: the place in the queue, 1 being next.
onStop
() => voidShows Stop while streaming (Cancel while queued). The product aborts the request and sets phase to "stopped".
onRetry
() => voidAfter an error: shows Try again.
error
stringThe error, in words, after "Failed".
reasoning
stringA reasoning part the model streams before the answer: shown apart, under a Reasoning button, closed by default.
defaultReasoningOpen
boolean = falseOpen the reasoning part at first.
startedAt
numberWhen the request was sent, when the first token arrived and when it ended, in ms (Date.now() or performance.now()).
firstTokenAt
number
finishedAt
number
durationMs
numberDurations the server reports, in ms; they win over the timestamps.
firstTokenMs
number
label
stringThe answer's name for screen readers ("Caption", "Answer from PerceptionVLM"). Wins over labels.name.
announce
false | "text" | "status" = "text"Read the answer aloud in sentences while it streams ("text", default), say only the phases ("status"), or nothing.
announceEveryMs
number = 5000The shortest time between two readings of the answer. Default 5,000 ms.
locale
stringFormats the times and the queue position.
labels
Partial<StreamingTextLabels>