Bursts become reading: text is revealed at speed characters per second instead of in chunks.
A backlog speeds the reveal up so it is shown within about catchUp milliseconds.
Emoji, flags and combining marks are never split, and a half-received emoji waits for the rest.
A rewritten answer continues from the shared start instead of starting over.
Revealed characters go straight to the page; React renders only a few times per second.
Use it for
An assistant's answer in a chat.
A build or deploy log.
Live captions.
Props
Prop
Type
Default
Description
text
string
—required
The text so far. Growing text is revealed at a steady pace; a rewrite continues from the shared start.
speed
number
90
Base reveal rate in characters per second.
catchUp
number
900
A backlog is revealed within about this many milliseconds by speeding up.
initial
boolean
false
Also reveal the text present on mount (otherwise it shows at once).
effect
'fade' | 'none'
'fade'
fade fades new characters in; none shows them directly.
children
(visible: string) => ReactNode
A function that receives the paced text, for example to render Markdown.
as
element
'span'
The element to render.
onMotionComplete
(text) => void
Runs whenever the reveal catches up with text.
Other props go to the rendered element, so className, style and event handlers work as usual.
Web and React Native
On the web new characters fade in (effect="fade") and are folded into plain, selectable text. A function child receives the paced string for Markdown, at most every other frame. In a hidden tab everything shows at once.
On React Native the text is a real Text and appears without a fade.