Types a phrase, pauses, backspaces and types the next, with a human rhythm and a caret that blinks only at rest.
Text that arrives a few words at a time like an AI assistant answering, each word fading up from a soft blur behind a pulsing caret.
Customize
Usage
import { AiStreamText } from "@/components/motionkit/ai-stream-text";
<AiStreamText
text={answer}
className="text-sm leading-6"
/>Motion
The exact curves this component runs, plotted with Motion's own maths.
Word fades in
Each word arrives
AI product landing pages, chat and assistant demos, onboarding flows and anywhere you show what a model would say.
The text is split into words with their spacing kept. A timer reveals one at a time, at a pace that varies a little and pauses longer after commas and full stops, like real streaming. Each new word fades up from a slight blur, and a caret pulses at the end until the last word arrives. Screen readers get the whole response at once.
| Prop | Type | Default | Description |
|---|---|---|---|
| text | string | — | The full response; line breaks start new lines. |
| speed | number | 14 | Roughly how many words arrive per second. |
| delay | number | 0.6 | Seconds before the first word. |
| caret | boolean | true | Show a caret while streaming. |
| trigger | "view" | "mount" | "view" | Start when scrolled into view, or straight away. |
| replay | number | 0 | Change it to stream again from the start. |
| onDone | () => void | — | Called when the last word has arrived. |
How we audit: the WCAG 2.2 animation checklist and respecting reduced motion in React.
Yes. The file starts with "use client", so you can import it straight into a Server Component page or layout. It works in Vite as is, and in Astro as a React island.
Only the motion package, beside React and Tailwind CSS v4. There is no MotionKit package and no Tailwind config to add.
Yes, with MotionKit Plus. Add the @motionkit registry and your personal token to components.json (the snippet is on your account page), then run npx shadcn@latest add @motionkit/ai-stream-text. It saves the file to components/motionkit and installs its dependencies.
AI Stream Text is part of MotionKit Plus (£12 / $15 / €14 a month or £96 / $120 / €112 a year). The live preview and playground are free to explore; Plus unlocks its source code, every customisation control and commercial use.
With reduced motion on, the whole text appears straight away.
It animates text you already have. For a live model response, render the words as they arrive from your stream instead and reuse the same fade-in on each new word.
Types a phrase, pauses, backspaces and types the next, with a human rhythm and a caret that blinks only at rest.
Crisp letters lit from behind by a soft, slowly flowing glow of colour, the way a new AI feature or a launch headline glows.
Headline text with a slowly flowing, seamlessly looping gradient.
The live preview is free to explore. Plus unlocks the source for AI Stream Text and every other premium component.
Not ready for Plus? A free account unlocks 4 premium components, Depth Card, Rolling Text, Dot Wave and Confetti Button, with no card needed.
Customize
Usage
import { AiStreamText } from "@/components/motionkit/ai-stream-text";
<AiStreamText
text={answer}
className="text-sm leading-6"
/>Motion
The exact curves this component runs, plotted with Motion's own maths.
Word fades in
Each word arrives