Components / Content / Response Stream
Response Stream
Animates text in token-by-token (typewriter) or word-by-word (fade).
Installation
Install the Response Stream React component with the shadcn CLI (after adding the @ai-primitive registry and theme, see Installation):
npx shadcn@latest add @ai-primitive/response-stream
Usage
import { ResponseStream } from "@/components/ui/response-stream"
Related components
- Markdown - Streaming-safe markdown renderer with GFM support and code blocks built in.
- JSX Preview - Renders a JSX string as live output, auto-closing open tags mid-stream.
- Image - Displays a URL, base64, or raw-bytes image, with an animated placeholder while pending.
- File Upload - A drag-and-drop dropzone that overlays the whole page while a file is dragged over it.
Previous: Markdown · Next: JSX Preview