Streamdown-Svelte

Streamdown-Svelte is a markdown renderer designed for streaming content from AI models. Highly interactive, customizable, and easy to use.

A fully-loaded Markdown renderer

Built-in typography, streaming carets, animations, plugins, and more.

Live demo

Typography & GFM

Built-in typography for headings, lists, and code blocks. GitHub Flavored Markdown adds tables, task lists, strikethrough, and autolinks.

Streaming experience

Built-in caret indicators show users content is generating. Unterminated block styling and animations make partial Markdown look polished while tokens are still arriving.

Interactive code blocks

Shiki-powered syntax highlighting with copy and download controls. Streamdown-Svelte supports language detection, line numbers, and custom renderers for rich fenced blocks.

Math, diagrams & CJK

LaTeX math through KaTeX, interactive Mermaid diagrams with fullscreen viewing, and CJK support for correct ideographic punctuation.

Security & link safety

Security hardening blocks images and links from unexpected origins. URL policy, safe HTML handling, and controlled embeds keep streamed content predictable.

Fully customizable

Override any element with custom Svelte components, apply your own styles, and fine-tune behavior through plugins and configuration without forking the renderer.

Get started in seconds

Install only what you need. Plugins are optional and tree-shakeable for minimal bundle size.

Svelte src/lib/ChatMessage.svelte
svelte
<script lang="ts">import { Streamdown } from "streamdown-svelte";import { code } from "@streamdown-svelte/code";import { mermaid } from "@streamdown-svelte/mermaid";import { math } from "@streamdown-svelte/math";import { cjk } from "@streamdown-svelte/cjk";import "katex/dist/katex.min.css";
export let content = "";export let isStreaming = false;</script>
<Streamdown  {content}  plugins={{ code, mermaid, math, cjk }}  isAnimating={isStreaming}/>

Performance

Current workspace benchmark snapshot against the upstream Streamdown reference. These figures come from the same compare report previewed in the README.

Snapshot from April 7, 2026 on Linux x64, Intel Core Ultra 9 285K, Node 22.22.1.

Overall throughput

+31.8%

Geometric mean across 31 benchmark pairs

Head-to-head wins

19 / 31

Local Streamdown-Svelte wins over upstream reference

Stream render suite

+273.3%

Fastest area, with 5 out of 5 wins

Benchmark comparison by scenario

Stream Render

+273.3%

5 wins / 0 losses

Table Utilities

+34.9%

9 wins / 0 losses

Remend Parser

-3.3%

4 wins / 5 losses

Parse Blocks

-5.1%

1 win / 7 losses

Upgrade your AI experiences