Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
vercel avatar

Streamdown

  • 2.3k installs
  • 5.4k repo stars
  • Updated July 21, 2026
  • vercel/streamdown

streamdown is a Vercel skill for configuring the Streamdown streaming React Markdown renderer and plugins.

About

The streamdown skill implements Vercel Streamdown, a streaming-optimized React Markdown renderer with syntax highlighting, Mermaid, math, and CJK support. Quick setup installs streamdown plus optional @streamdown/code, mermaid, math, and cjk plugins, then adds required Tailwind v4 @source lines or v3 content entries for dist JS scanning, a commonly missed step. Basic usage imports Streamdown with a markdown string; AI chat examples pair useChat from @ai-sdk/react with caret and isAnimating props on the final assistant message. Static mode suits blogs and docs without streaming indicators. Key props cover mode, plugins, controls, linkSafety, shikiTheme, allowedElements, and urlTransform with references for full API, styling, security, and features. Gotchas include importing katex CSS for math, requiring both caret and isAnimating for visible carets, disabled copy buttons during animation, and explicit shiki dependency for Next.js transpilePackages. Example files demonstrate basic streaming, caret, full-featured, static, and custom security configurations.

  • Drop-in streaming Markdown renderer replacing react-markdown patterns.
  • Requires Tailwind @source or content scanning of streamdown dist files.
  • Integrates with Vercel AI SDK useChat via caret and isAnimating props.
  • Optional plugins for code, Mermaid, math, and CJK with setup notes.
  • Documents linkSafety, allowedElements, and Shiki theme customization.

Streamdown by the numbers

  • 2,262 all-time installs (skills.sh)
  • +59 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #205 of 2,277 Frontend Development skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

streamdown capabilities & compatibility

Capabilities
streamdown install and tailwind source configura · ai sdk usechat streaming integration pattern · plugin setup for code, mermaid, math, and cjk · linksafety and custom html tag hardening · static versus streaming mode configuration
Works with
vercel
Use cases
frontend · ui design · documentation
npx skills add https://github.com/vercel/streamdown --skill streamdown

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs2.3k
repo stars5.4k
Security audit1 / 3 scanners passed
Last updatedJuly 21, 2026
Repositoryvercel/streamdown

How do I render streaming AI Markdown with syntax highlighting and safe links in React?

Implement Streamdown streaming React Markdown with plugins, Tailwind setup, AI SDK integration, and security controls.

Who is it for?

Next.js or React apps using Vercel AI SDK or streaming assistant Markdown output.

Skip if: Skip for non-React static site generators without a React Markdown component integration.

When should I use this skill?

User sets up Streamdown, streaming markdown, Shiki themes, Mermaid in chat, or link safety.

What you get

Streamdown configured with Tailwind sources, plugins, and AI chat streaming props working in production.

  • Streamdown chat component
  • Plugin configuration
  • Streaming markdown UI

By the numbers

  • 4 optional tree-shakeable plugins: code, mermaid, math, and cjk
  • Drop-in replacement for react-markdown with remend unterminated-block parsing

Files

SKILL.mdMarkdownGitHub ↗

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

npm install streamdown

Optional plugins (install only what's needed):

npm install @streamdown/code @streamdown/mermaid @streamdown/math @streamdown/cjk

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:

@source "../node_modules/streamdown/dist/*.js";

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:

module.exports = {
  content: [
    "./app/**/*.{js,ts,jsx,tsx,mdx}",
    "./node_modules/streamdown/dist/*.js",
  ],
};

3. Basic Usage

import { Streamdown } from 'streamdown';

<Streamdown>{markdown}</Streamdown>

4. With AI Streaming (Vercel AI SDK)

'use client';
import { useChat } from '@ai-sdk/react';
import { Streamdown } from 'streamdown';
import { code } from '@streamdown/code';

export default function Chat() {
  const { messages, input, handleInputChange, handleSubmit, isLoading } = useChat();

  return (
    <>
      {messages.map((msg, i) => (
        <Streamdown
          key={msg.id}
          plugins={{ code }}
          caret="block"
          isAnimating={isLoading && i === messages.length - 1 && msg.role === 'assistant'}
        >
          {msg.content}
        </Streamdown>
      ))}
      <form onSubmit={handleSubmit}>
        <input value={input} onChange={handleInputChange} disabled={isLoading} />
      </form>
    </>
  );
}

5. Static Mode (Blogs, Docs)

<Streamdown mode="static" plugins={{ code }}>
  {content}
</Streamdown>

Key Props

PropTypeDefaultPurpose
childrenstringMarkdown content
mode`"streaming" \"static"`"streaming"
plugins{ code?, mermaid?, math?, cjk? }Feature plugins
isAnimatingbooleanfalseStreaming indicator
caret`"block" \"circle"`
componentsComponentsCustom element overrides
controls`boolean \object`true
linkSafetyLinkSafetyConfig{ enabled: true }Link confirmation modal
shikiTheme[light, dark]['github-light', 'github-dark']Code themes
classNamestringContainer class
allowedElementsstring[]allTag names to allow
disallowedElementsstring[][]Tag names to disallow
allowElementAllowElementCustom element filter
unwrapDisallowedbooleanfalseKeep children of disallowed elements
skipHtmlbooleanfalseIgnore raw HTML
urlTransformUrlTransformdefaultUrlTransformTransform/sanitize URLs

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

Plugin Quick Reference

PluginPackagePurpose
Code@streamdown/codeSyntax highlighting (Shiki, 200+ languages)
Mermaid@streamdown/mermaidDiagrams (flowcharts, sequence, etc.)
Math@streamdown/mathLaTeX via KaTeX (requires CSS import)
CJK@streamdown/cjkChinese/Japanese/Korean text support

Math requires CSS:

import 'katex/dist/katex.min.css';

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

References

Use these for deeper implementation details:

  • [references/api.md](references/api.md) — Complete props, types, and interfaces
  • [references/plugins.md](references/plugins.md) — Plugin setup, configuration, and customization
  • [references/styling.md](references/styling.md) — CSS variables, data attributes, custom components, theme examples
  • [references/security.md](references/security.md) — Hardening, link safety, custom HTML tags, production config
  • [references/features.md](references/features.md) — Carets, remend, static mode, controls, GFM, memoization, troubleshooting

Example Configurations

Copy and adapt from assets/examples/:

  • [basic-streaming.tsx](assets/examples/basic-streaming.tsx) — Minimal AI chat with Vercel AI SDK
  • [with-caret.tsx](assets/examples/with-caret.tsx) — Streaming with block caret cursor
  • [full-featured.tsx](assets/examples/full-featured.tsx) — All plugins, carets, link safety, controls
  • [static-mode.tsx](assets/examples/static-mode.tsx) — Blog/docs rendering
  • [custom-security.tsx](assets/examples/custom-security.tsx) — Strict security for AI content

Common Gotchas

1. Tailwind styles missing — Add @source directive or content entry for node_modules/streamdown/dist/*.js 2. Math not rendering — Import katex/dist/katex.min.css 3. Caret not showing — Both caret prop AND isAnimating={true} are required 4. Copy buttons during streaming — Disabled automatically when isAnimating={true} 5. Link safety modal appearing — Enabled by default; disable with linkSafety={{ enabled: false }} 6. Shiki warning in Next.js — Install shiki explicitly, add to transpilePackages 7. `allowedTags` not working — Only works with default rehype plugins 8. Math uses `$$` not `$` — Single dollar is disabled by default to avoid currency conflicts

Related skills

How it compares

Pick streamdown over react-markdown when AI chat streams produce incomplete markdown blocks that need remend parsing, isAnimating carets, and rehype-harden sanitization.

FAQ

Why are Streamdown styles missing?

Add Tailwind v4 @source for node_modules/streamdown/dist/*.js or v3 content entry.

Why is the streaming caret invisible?

Both caret prop and isAnimating true are required on the streaming message.

What extra import does math need?

Import katex/dist/katex.min.css when using the @streamdown/math plugin.

Is Streamdown safe to install?

skills.sh reports 1 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.