Streaming

StreamingText

Character-by-character typewriter with a blinking cursor. Useful for pre-rendered transcripts, onboarding copy, and demos that mimic token streaming. For real network streams, prefer @ai-sdk/react's useChat() and pass the partial string to <StreamingText/>.

Sourcesrc/components/ai/streaming-text.tsx

Default

A single string types out at ~25ms per character and settles with a blinking cursor.

Faster speed, no cursor

Set showCursor={false} when chaining multiple lines, and speed to tune the tempo.

Instant render

speed={0} flushes the full string on first paint — handy for documenting a completed state without animation.