Skip to content
← Inventory

StreamingText

Progressive streaming answer with settle-gated chrome.

Follow-ups

Usage

import { StreamingText, StreamingTextDemo, StreamingTextProps, StreamingTextSource, StreamingTextToken } from "@desk/ui/components/streaming-text";

Best practices

  • Drive tokens from real stream deltas — don't fake a word clock in product code. Showcase demos may animate.

Props

PropTypeDefaultDescription
classNamestring
tokens(required)StreamingTextToken[]

Tokens revealed so far (controlled).

streamingboolean

Whether the stream is still open.

sourcesStreamingTextSource[]

Sources for the stacked avatars + disclosure.

sourceCountnumber

Source count label (may exceed sources.length).

followUpsstring[]

Follow-up prompts revealed after settle.

onFollowUp(text: string) => void

Called when a follow-up is chosen.

actionsReactNode

Optional action icons rendered after settle.

Also exports

  • componentStreamingTextDemo
  • interfaceStreamingTextProps
  • interfaceStreamingTextSource
  • interfaceStreamingTextToken

Composition

Builds on

Text