# vercel/streamdown

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/vercel-streamdown).**

4,420 stars · 223 forks · TypeScript · other

## Links

- GitHub: https://github.com/vercel/streamdown
- Homepage: https://streamdown.ai/
- awesome-repositories: https://awesome-repositories.com/repository/vercel-streamdown.md

## Topics

`ai` `markdown` `streaming`

## Description

Streamdown is a streaming markdown renderer for React that transforms incoming markdown text into sanitized HTML in real time, handling incomplete blocks as they arrive. It parses GitHub-Flavored Markdown syntax including tables, task lists, and footnotes, and renders LaTeX math expressions using KaTeX, Mermaid diagrams as interactive SVGs, and code blocks with Shiki-based syntax highlighting supporting over 200 languages with dual light and dark themes. The renderer includes an XSS-safe HTML sanitizer that strips dangerous tags and validates URLs to prevent injection attacks.

What distinguishes Streamdown is its streaming-first architecture: it parses markdown into blocks as tokens arrive, detecting and completing unterminated fences and math delimiters so partial content appears styled immediately without waiting for the full document. Deferred diagram rendering delays Mermaid SVG generation until the code block is complete, preventing flicker during streaming, while a memoized block cache updates only changed blocks to avoid full re-renders. The component override system lets developers replace any standard HTML element with a custom React component, and the plugin pipeline supports custom rehype and remark plugins for extended transformations.

The renderer provides interactive controls including hover-activated copy buttons and download menus on code blocks, a blinking caret indicator during active streaming, and a confirmation modal for external links. It supports configurable HTML sanitization with allow and deny lists, URL protocol and domain restrictions, image source restrictions, and trusted domain safelisting. Performance optimizations include lazy-loaded syntax highlighters, internal render memoization, and caching of parsed tokens and highlighter instances.

## Tags

### Content Management & Publishing

- [Real-Time Streaming Renderers](https://awesome-repositories.com/f/content-management-publishing/markdown-renderers/real-time-streaming-renderers.md) — Transforms incoming markdown text streams into sanitized HTML components with real-time rendering of incomplete blocks.
- [Markdown-to-HTML Transpilers](https://awesome-repositories.com/f/content-management-publishing/content-processing-transformation/markdown-markup-tools/markdown-processors/html-to-markdown-reversion-tools/markdown-to-html-transpilers.md) — Transforms incoming markdown text into sanitized HTML, handling incomplete blocks and partial content as it arrives. ([source](https://streamdown.ai/docs/migrate))
- [GitHub Flavored](https://awesome-repositories.com/f/content-management-publishing/content-processing-transformation/markdown-markup-tools/markdown-processors/markdown-parsers/github-flavored.md) — Parses GFM syntax including tables, task lists, strikethrough, autolinks, and footnotes from streaming content.
- [Markdown Renderers](https://awesome-repositories.com/f/content-management-publishing/markdown-renderers.md) — Renders tables, task lists, strikethrough, autolinks, and footnotes from incoming markdown streams. ([source](https://streamdown.ai/docs/plugins))
- [Partial Stream Parsing](https://awesome-repositories.com/f/content-management-publishing/markdown-renderers/partial-stream-parsing.md) — Parses incomplete Markdown blocks as they arrive and applies progressive formatting so partial content appears styled immediately. ([source](https://streamdown.ai/docs))
- [Code Block Copy and Download Controls](https://awesome-repositories.com/f/content-management-publishing/documentation-knowledge-management/code-display-snippets/interactive-snippet-controls/code-block-copy-and-download-controls.md) — Provides hover-activated copy buttons and download menus on code blocks for easy content reuse.

### Software Engineering & Architecture

- [Streaming Block Parsers](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/extensibility/plugin-architectures/domain-specific/language-support-definitions/language-parsing-rules/block-level-parsing-rules/streaming-block-parsers.md) — Parses markdown into blocks as tokens arrive, handling incomplete fences and math delimiters without waiting for the full document.
- [Built-in Markdown Plugins](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/plugin-module-systems/modular-plugin-architectures/plugin-based-architectures/plugin-based-architectures/design-export-plugins/built-in-design-exports/built-in-markdown-plugins.md) — Supports GFM, KaTeX math, raw HTML, and CJK-friendly rendering without extra plugin installations. ([source](https://streamdown.ai/docs/migrate))
- [Markdown Plugin Pipelines](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/plugin-module-systems/modular-plugin-architectures/plugin-based-architectures/plugin-based-architectures/pipeline-plugins/markdown-plugin-pipelines.md) — Processes markdown through a configurable chain of unified rehype and remark plugins for extensible transformations.
- [Incomplete Code Fence Detection](https://awesome-repositories.com/f/software-engineering-architecture/fenced-diff-formats/incomplete-code-fence-detection.md) — Provides a hook to check if the current code block is still being streamed, enabling a loading state. ([source](https://streamdown.ai/docs/components))
- [Unified Plugin Pipelines](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/extensibility/plugin-architectures/developer-authoring-interfaces/custom-module-implementations/module-functionality-extenders/plugin-extenders/unified-plugin-pipelines.md) — Attaches rehype and remark plugins for custom transformations, security hardening, and extended syntax support. ([source](https://streamdown.ai/docs/configuration))
- [Custom Block Parsing Overrides](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/extensibility/plugin-architectures/domain-specific/language-support-definitions/language-parsing-rules/block-level-parsing-rules/custom-block-parsing-overrides.md) — Allows overriding how the markdown stream is split into blocks and how each block is rendered by supplying custom parsing and component logic. ([source](https://streamdown.ai/docs/configuration))
- [Streaming State Transitions](https://awesome-repositories.com/f/software-engineering-architecture/state-transition-models/visual-state-transitions/streaming-state-transitions.md) — Updates rendered output from incomplete to complete states without visual jumps or layout shifts. ([source](https://streamdown.ai/docs))

### Business & Productivity Software

- [HTML Element Filters](https://awesome-repositories.com/f/business-productivity-software/tag-filtering-systems/html-element-filters.md) — Controls which HTML elements appear in the output by whitelisting, blacklisting, or applying custom filter functions. ([source](https://streamdown.ai/docs/configuration))
- [Interactive Task Lists](https://awesome-repositories.com/f/business-productivity-software/todo-list-managers/interactive-task-lists.md) — Converts checkbox-style markdown lists into clickable todo items that users can check off. ([source](https://streamdown.ai/docs/gfm))

### Data & Databases

- [Incomplete Code Block Streaming](https://awesome-repositories.com/f/data-databases/stream-filters/stream-block-querying/incomplete-code-block-streaming.md) — Displays partially streamed code blocks gracefully, rendering content before closing backticks arrive. ([source](https://streamdown.ai/docs/code-blocks))

### Development Tools & Productivity

- [Incomplete Markdown Syntax Handling](https://awesome-repositories.com/f/development-tools-productivity/code-completion/automatic-syntax-completion/incomplete-markdown-syntax-handling.md) — Detects unterminated Markdown tokens and completes them automatically to prevent broken rendering during streaming. ([source](https://streamdown.ai/docs))
- [Mermaid Diagram Renderers](https://awesome-repositories.com/f/development-tools-productivity/markdown-documentation-systems/diagram-integrations/mermaid-diagram-renderers.md) — Renders text-based Mermaid diagrams as interactive SVGs with fullscreen, download, and copy controls. ([source](https://streamdown.ai/docs/migrate))
- [Deferred Diagram Renderers](https://awesome-repositories.com/f/development-tools-productivity/markdown-documentation-systems/diagram-integrations/mermaid-diagram-renderers/deferred-diagram-renderers.md) — Delays Mermaid SVG generation until the code block is complete, preventing flicker during streaming.
- [Deferred Diagram Rendering](https://awesome-repositories.com/f/development-tools-productivity/markdown-documentation-systems/diagram-integrations/mermaid-diagram-renderers/deferred-diagram-rendering.md) — Defers Mermaid rendering until the code block is complete during streaming, preventing flicker and re-rendering on partial content. ([source](https://streamdown.ai/docs/plugins/mermaid))
- [Code Block Styling](https://awesome-repositories.com/f/development-tools-productivity/monospaced-fonts/code-block-styling.md) — Configures line numbers, start line offset, dual light/dark themes, and responsive styling for code blocks. ([source](https://streamdown.ai/docs/code-blocks))
- [Markdown Plugin Array Customizations](https://awesome-repositories.com/f/development-tools-productivity/plugin-systems/custom-plugin-registrations/markdown-plugin-array-customizations.md) — Allows replacing or extending the default set of processing plugins by supplying a custom plugin array. ([source](https://streamdown.ai/docs/plugins))

### Scientific & Mathematical Computing

- [LaTeX Math Rendering](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/mathematical-typesetting-engines/mathematical-typesetting/latex-math-rendering.md) — Renders LaTeX mathematical notation into fast, accessible HTML using KaTeX, supporting both inline and block equations. ([source](https://streamdown.ai/docs/plugins/math))
- [Incomplete Equation Handling](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/mathematical-typesetting-engines/mathematical-typesetting/equation-renderers/incomplete-equation-handling.md) — Detects and closes unterminated block-level math delimiters during streaming for correct partial equation rendering. ([source](https://streamdown.ai/docs/plugins/math))

### Security & Cryptography

- [HTML Content Sanitization](https://awesome-repositories.com/f/security-cryptography/html-content-sanitization.md) — Strips dangerous HTML tags and validates URLs to prevent XSS attacks in rendered markdown output.
- [XSS Protections](https://awesome-repositories.com/f/security-cryptography/xss-protections.md) — Strips dangerous elements and attributes from rendered output using configurable allow or deny lists. ([source](https://streamdown.ai/docs/plugins))
- [HTML Allowlists](https://awesome-repositories.com/f/security-cryptography/security/utilities/allowlist-management/html-allowlists.md) — Permits specific unknown HTML tags in rendered output while stripping all attributes not explicitly listed. ([source](https://streamdown.ai/docs/security))

### User Interface & Experience

- [Component Override Systems](https://awesome-repositories.com/f/user-interface-experience/component-override-systems.md) — Provides a mechanism to replace standard HTML elements with custom React components via configuration.
- [Markdown Renderers](https://awesome-repositories.com/f/user-interface-experience/data-display-components/markdown-renderers.md) — Configures syntax highlighting themes, custom components, and allowed HTML tags for streaming markdown rendering. ([source](https://streamdown.ai/docs/configuration))
- [Markdown Table Rendering](https://awesome-repositories.com/f/user-interface-experience/data-visualization-tools/data-visualization/specific-chart-types/table-visualizations/markdown-table-rendering.md) — Formats tabular data with column alignment options, producing structured HTML tables from pipe-delimited markdown. ([source](https://streamdown.ai/docs/gfm))
- [Component Overrides](https://awesome-repositories.com/f/user-interface-experience/editor-customization-tools/editor-component-replacements/component-overrides.md) — Allows replacing any of the standard HTML elements rendered from markdown with a custom React component. ([source](https://streamdown.ai/docs/components))
- [Raw HTML Rendering](https://awesome-repositories.com/f/user-interface-experience/raw-html-rendering.md) — Preserves inline HTML tags intact and renders them directly within the markdown output. ([source](https://streamdown.ai/docs/plugins))
- [Syntax Highlighters](https://awesome-repositories.com/f/user-interface-experience/syntax-highlighters.md) — Applies Shiki-based syntax highlighting to code blocks with 200+ languages and dual light/dark themes. ([source](https://streamdown.ai/docs/migrate))
- [Lazy-Loaded](https://awesome-repositories.com/f/user-interface-experience/syntax-highlighters/lazy-loaded.md) — Loads syntax highlighting themes and languages on demand, caching each highlighter instance for reuse across code blocks.
- [Shiki](https://awesome-repositories.com/f/user-interface-experience/syntax-highlighters/shiki.md) — Applies automatic syntax highlighting to code blocks using Shiki with support for 200+ languages and dual themes.
- [Parsed Block Caching](https://awesome-repositories.com/f/user-interface-experience/syntax-highlighting/performance-optimized-highlighting/parsed-block-caching.md) — Caches parsed and rendered blocks by content hash, updating only changed blocks to avoid full re-renders.
- [Custom Component Tags](https://awesome-repositories.com/f/user-interface-experience/buttons/custom-html-elements/custom-component-tags.md) — Accepts a list of allowed custom HTML tags so structured data from AI responses renders as interactive components. ([source](https://streamdown.ai/docs/components))
- [Phrase Line Break Preservers](https://awesome-repositories.com/f/user-interface-experience/forced-line-breaks/phrase-line-break-preservers.md) — Preserves single newlines within paragraphs as spaces, combining lines into one paragraph unless forced breaks are used. ([source](https://streamdown.ai/docs/gfm))
- [Prose Typography Styling](https://awesome-repositories.com/f/user-interface-experience/html-content-processing/html-content-processing/prose-typography-styling.md) — Applies prebuilt typographic styles to paragraphs, headings, and lists from rendered markdown. ([source](https://streamdown.ai/docs/migrate))
- [Interactive Content Controls](https://awesome-repositories.com/f/user-interface-experience/interactive-content-controls.md) — Adds hover-activated copy buttons, download menus, and link-confirmation modals to rendered markdown elements.
- [Token and Highlighter Caches](https://awesome-repositories.com/f/user-interface-experience/syntax-highlighting/performance-optimized-highlighting/token-and-highlighter-caches.md) — Caches tokens, lazy-loads syntax highlighters, and skips animation when not needed to reduce processing overhead. ([source](https://streamdown.ai/docs/plugins))
- [Strikethrough Text Decorations](https://awesome-repositories.com/f/user-interface-experience/terminal-text-styling/strikethrough-text-decorations.md) — Displays text with a horizontal line through it to indicate deletion or outdated content. ([source](https://streamdown.ai/docs/gfm))
- [Memoized Rendering](https://awesome-repositories.com/f/user-interface-experience/virtual-rendering/rendering-optimizations/memoized-rendering.md) — Caches rendered output to avoid unnecessary re-renders, eliminating the need for manual memoization wrappers. ([source](https://streamdown.ai/docs/migrate))

### Part of an Awesome List

- [Streaming Caret Indicators](https://awesome-repositories.com/f/awesome-lists/devtools/activity-indicators/streaming-caret-indicators.md) — Displays a blinking visual indicator during active streaming to signal that content is still being generated. ([source](https://streamdown.ai/docs/carets))

### Web Development

- [Feature Toggles](https://awesome-repositories.com/f/web-development/browser-automation/stealth-configurations/feature-toggles.md) — Enables or disables Mermaid diagrams, animation controls, link safety checks, and UI icons through dedicated configuration props. ([source](https://streamdown.ai/docs/configuration))
- [Block-Level Content Caches](https://awesome-repositories.com/f/web-development/streaming-rendering/incremental-content-streaming/block-level-content-caches.md) — Prevents unnecessary re-renders by caching parsed blocks and only updating blocks whose content has changed during streaming. ([source](https://streamdown.ai/docs/memoization))
- [Streaming Content Animations](https://awesome-repositories.com/f/web-development/streaming-rendering/incremental-content-streaming/streaming-content-animations.md) — Imports animation CSS to enable the built-in animated prop for streaming markdown rendering. ([source](https://streamdown.ai/docs/getting-started))
