惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News and Events Feed by Topic
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Hugging Face - Blog
Hugging Face - Blog
S
SegmentFault 最新的问题
IT之家
IT之家
M
MIT News - Artificial intelligence
博客园_首页
aimingoo的专栏
aimingoo的专栏
C
Check Point Blog
B
Blog
人人都是产品经理
人人都是产品经理
爱范儿
爱范儿
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
L
LangChain Blog
Last Week in AI
Last Week in AI
Engineering at Meta
Engineering at Meta
Microsoft Security Blog
Microsoft Security Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
F
Fortinet All Blogs
罗磊的独立博客
博客园 - 叶小钗
H
Help Net Security
Google Online Security Blog
Google Online Security Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
The Last Watchdog
The Last Watchdog
S
Security @ Cisco Blogs
Google DeepMind News
Google DeepMind News
Cyberwarzone
Cyberwarzone
月光博客
月光博客
C
Cybersecurity and Infrastructure Security Agency CISA
博客园 - 司徒正美
S
Schneier on Security
V
Vulnerabilities – Threatpost
T
Troy Hunt's Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
博客园 - 【当耐特】
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Forbes - Security
Forbes - Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
雷峰网
雷峰网
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
Secure Thoughts
V
Visual Studio Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
云风的 BLOG
云风的 BLOG
T
Tailwind CSS Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
Hacker News: Ask HN
Hacker News: Ask HN
The GitHub Blog
The GitHub Blog

Streamdown Documentation

Configuration Getting Started Introduction Security Animation Carets Code Blocks Components GitHub Flavored Markdown Interactivity Internationalization Link Safety Memoization Migrate from react-markdown Styling Unterminated Block Parsing Typography Usage @streamdown/cjk @streamdown/code Built-in Plugins @streamdown/math @streamdown/mermaid Custom renderers
FAQ
Vercel · 2026-06-02 · via Streamdown Documentation

Common questions about Streamdown and how it works with AI-powered streaming applications.

Answers to frequently asked questions about using Streamdown in your projects.

Streamdown is specifically designed for AI-powered streaming applications. It integrates with the remend preprocessor to handle incomplete markdown syntax, which means it can render markdown gracefully even while it's being generated by AI models. It also includes security features like URL prefix restrictions and better performance optimizations for streaming contexts.

Yes! Streamdown fully supports custom components through the components prop, just like react-markdown. You can override any markdown element with your own React components to customize the rendering.

When parseIncompleteMarkdown is enabled (default), Streamdown uses the remend package to preprocess the markdown before rendering. Remend automatically detects and completes common issues in incomplete markdown like unclosed bold/italic markers, incomplete links, and partial code blocks. This preprocessing ensures smooth rendering even as markdown is being streamed from AI models. You can also use remend as a standalone package in your own projects.

Streamdown supports both remark and rehype plugins, making it compatible with most react-markdown plugins. It includes remarkGfm by default, and supports additional plugins like @streamdown/math and @streamdown/mermaid through the plugins prop. You can also add custom remark and rehype plugins through the remarkPlugins and rehypePlugins props.

This warning occurs when Next.js tries to treat Shiki as an external package. To fix this, you need to install Shiki explicitly with npm install shiki and add it to your transpilePackages array in your next.config.ts:

{
  // ... other config
  transpilePackages: ["shiki"],
}

This ensures Shiki is properly bundled with your application.

When using Streamdown with Vite and server-side rendering, you might encounter a TypeError [ERR_UNKNOWN_FILE_EXTENSION] error for CSS files (like katex.min.css). To fix this, add Streamdown to your vite.config.ts:

export default {
  // ... other config
  ssr: {
    noExternal: ['streamdown'],
  },
}

This prevents Vite from treating Streamdown as an external module during SSR, ensuring CSS files are properly processed.

Tailwind v4

Add a @source directive to your globals.css file with the path to Streamdown's distribution files:

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

If you install optional plugins, add their matching @source lines only for packages you've installed. See the plugin pages for exact paths and examples:

Example: to include the code plugin, add this to globals.css (adjust the relative path as needed):

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

Tailwind v3

Add Streamdown to your content array in tailwind.config.js:

content: [
  // ... your other content paths
  "./node_modules/streamdown/dist/*.js",
]

Adjust the paths based on your project structure. This ensures Tailwind scans Streamdown's files for any utility classes used in the component.

If you run into bundling errors related to vscode-jsonrpc, langium, or other Node.js-only packages when using Streamdown with Next.js/Turbopack, this is due to Mermaid's dependency tree including server-side packages. To fix this, configure Next.js to exclude these packages from client-side bundling:

export default {
  serverComponentsExternalPackages: ['langium', '@mermaid-js/parser'],

  webpack: (config, { isServer }) => {
    if (!isServer) {
      config.resolve.alias = {
        ...config.resolve.alias,
        'vscode-jsonrpc': false,
        'langium': false,
      };
    }
    return config;
  },
};

This tells Next.js not to bundle these Node.js-only dependencies for the browser. This is an upstream issue being tracked in the Mermaid repository.