Primitive / Moleculebeta
Streaming Text
Progressive text reveal with caret and completion callback, instant under reduced motion.
pnpm dlx @glinui/cli@latest add streaming-textQ3 revenue review
Glin assistant, 3 sources
Installation
Install from
pnpm dlx @glinui/cli@latest add streaming-textPrefer the package?
Usage
The fourth turn streams in with a caret; reduced motion shows it instantly.
Accessibility
- The full text is present immediately in a visually hidden node, so screen readers do not hear character-by-character noise.
- The animated copy and caret are aria-hidden.
- Under reduced motion the text renders instantly and onDone still fires.
Reduced Motion
Reveal is skipped and the caret blink is disabled.
Affected properties
text revealcaret blinkAPI Reference
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
text | string | Yes | - | Full target text. Extending it keeps streaming from the current position. |
speed | number | No | 24 | Milliseconds per character. |
instant | boolean | No | false | Skip the animation. |
caret | boolean | No | true | Blinking caret while revealing. |
onDone | () => void | No | - | Fires once per completed text. |
Source
Import directly from the package or browse the source on GitHub. Click any file to view it.
Import
import { StreamingText } from "@glinui/ui"Dependencies
@glinui/uiGenerated API Snapshot
Beta
Generated API Snapshot
BetaAuto-extracted from TypeScript source in packages/ui/src/components/streaming-text.tsx. This section is in beta and may lag behind hand-curated docs. Regenerate with pnpm --filter @glinui/docs api:generate.
Generated: 2026-10-08T01:41:21.546Z · Full index: /docs/api-metadata
Primary Props Type
StreamingTextProps
StreamingTextProps
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
caret | boolean | No | true | Show a blinking caret while revealing. |
instant | boolean | No | false | Skip the animation and render everything at once. |
onDone | () => void | No | - | Called once each time the full text has been revealed. |
speed | number | No | 24 | Milliseconds per character. |
text | string | Yes | - | - |