Streamdown
Streaming-optimized React Markdown renderer. Drop-in replacement for react-markdown with built-in streaming support, security, and interactive controls.
Quick Setup
1. Install
Optional plugins (install only what's needed):
2. Configure Tailwind CSS (Required)
This is the most commonly missed step. Streamdown uses Tailwind for styling and the dist files must be scanned.
Tailwind v4 — add to globals.css:
Add plugin @source lines only for packages you have installed (omitting uninstalled plugins avoids Tailwind errors). See plugin pages for exact paths:
- Code:
@source "../node_modules/@streamdown/code/dist/*.js"; - CJK:
@source "../node_modules/@streamdown/cjk/dist/*.js"; - Math:
@source "../node_modules/@streamdown/math/dist/*.js"; - Mermaid:
@source "../node_modules/@streamdown/mermaid/dist/*.js";
Tailwind v3 — add to tailwind.config.js:
3. Basic Usage
4. With AI Streaming (Vercel AI SDK)
5. Static Mode (Blogs, Docs)
Key Props
For full API reference, see references/api.md [blocked].
Plugin Quick Reference
Math requires CSS:
For plugin configuration details, see references/plugins.md [blocked].
References
Use these for deeper implementation details:
- references/api.md [blocked] — Complete props, types, and interfaces
- references/plugins.md [blocked] — Plugin setup, configuration, and customization
- references/styling.md [blocked] — CSS variables, data attributes, custom components, theme examples
- references/security.md [blocked] — Hardening, link safety, custom HTML tags, production config
- references/features.md [blocked] — Carets, remend, static mode, controls, GFM, memoization, troubleshooting
Example Configurations
Copy and adapt from assets/examples/:
- basic-streaming.tsx [blocked] — Minimal AI chat with Vercel AI SDK
- with-caret.tsx [blocked] — Streaming with block caret cursor
- full-featured.tsx [blocked] — All plugins, carets, link safety, controls
- static-mode.tsx [blocked] — Blog/docs rendering
- custom-security.tsx [blocked] — Strict security for AI content
Common Gotchas
- Tailwind styles missing — Add
@sourcedirective orcontententry fornode_modules/streamdown/dist/*.js - Math not rendering — Import
katex/dist/katex.min.css - Caret not showing — Both
caretprop ANDisAnimating={true}are required - Copy buttons during streaming — Disabled automatically when
isAnimating={true} - Link safety modal appearing — Enabled by default; disable with
linkSafety={{ enabled: false }} - Shiki warning in Next.js — Install
shikiexplicitly, add totranspilePackages allowedTagsnot working — Only works with default rehype plugins- Math uses
$$not$— Single dollar is disabled by default to avoid currency conflicts


