Labsco
vercel logo

streamdown

✓ Official5,400

by vercel · part of vercel/streamdown

Streaming-optimized React Markdown renderer with syntax highlighting, diagrams, math, and AI chat integration. Supports four optional plugins: code syntax highlighting via Shiki (200+ languages), Mermaid diagrams, LaTeX math rendering, and CJK text support Two rendering modes: streaming (with animated caret cursor for AI chat) and static (for blogs and documentation) Built-in security features including link safety modals, HTML tag filtering, URL sanitization, and configurable element...

🔥🔥🔥🔥✓ VerifiedFreeQuick setup
🧰 Not standalone. This skill ships with vercel/streamdown and only works together with that tool — install the tool first, then add this skill.

Streaming-optimized React Markdown renderer with syntax highlighting, diagrams, math, and AI chat integration. Supports four optional plugins: code syntax highlighting via Shiki (200+ languages), Mermaid diagrams, LaTeX math rendering, and CJK text support Two rendering modes: streaming (with animated caret cursor for AI chat) and static (for blogs and documentation) Built-in security features including link safety modals, HTML tag filtering, URL sanitization, and configurable element...

Inspect the full instructions your agent will receiveExpand

This is the exact playbook injected into your agent when the skill activates — shown here so you can audit it before installing. You don't need to read it to use the skill.

by vercel

Streaming-optimized React Markdown renderer with syntax highlighting, diagrams, math, and AI chat integration. Supports four optional plugins: code syntax highlighting via Shiki (200+ languages), Mermaid diagrams, LaTeX math rendering, and CJK text support Two rendering modes: streaming (with animated caret cursor for AI chat) and static (for blogs and documentation) Built-in security features including link safety modals, HTML tag filtering, URL sanitization, and configurable element... npx skills add https://github.com/vercel/streamdown --skill streamdown Download ZIPGitHub5.4k

Streamdown

Streaming-optimized React Markdown renderer. Drop-in replacement for react-markdown with built-in streaming support, security, and interactive controls.

Key Props

Prop Type Default Purpose children string — Markdown content mode "streaming" | "static" "streaming" Rendering mode plugins { code?, mermaid?, math?, cjk? } — Feature plugins isAnimating boolean false Streaming indicator caret "block" | "circle" — Cursor style components Components — Custom element overrides controls boolean | object true Interactive buttons linkSafety LinkSafetyConfig { enabled: true } Link confirmation modal shikiTheme [light, dark] ['github-light', 'github-dark'] Code themes className string — Container class allowedElements string[] all Tag names to allow disallowedElements string[] [] Tag names to disallow allowElement AllowElement — Custom element filter unwrapDisallowed boolean false Keep children of disallowed elements skipHtml boolean false Ignore raw HTML urlTransform UrlTransform defaultUrlTransform Transform/sanitize URLs

For full API reference, see references/api.md.

Plugin Quick Reference

Plugin Package Purpose Code @streamdown/code Syntax highlighting (Shiki, 200+ languages) Mermaid @streamdown/mermaid Diagrams (flowcharts, sequence, etc.) Math @streamdown/math LaTeX via KaTeX (requires CSS import) CJK @streamdown/cjk Chinese/Japanese/Korean text support

Math requires CSS:

Copy & paste — that's it
import 'katex/dist/katex.min.css';

For plugin configuration details, see references/plugins.md.

References

Use these for deeper implementation details:

Common Gotchas

  • Tailwind styles missing — Add @source directive or content entry for node_modules/streamdown/dist/*.js

  • Math not rendering — Import katex/dist/katex.min.css

  • Caret not showing — Both caret prop AND isAnimating={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 shiki explicitly, add to transpilePackages

  • allowedTags not working — Only works with default rehype plugins

  • Math uses $$ not $ — Single dollar is disabled by default to avoid currency conflicts