FIG-001 · MASTHEAD

svelte/markdown.

A powerful, customizable markdown and HTML renderer for Svelte 5 — built for rendering streaming output from AI agents like Claude Code and ChatGPT. 24 renderers, 83 HTML tags, token caching, XSS-safe defaults, and allow/deny utilities, all fully typed.

get started ↗ api reference examples playground blog
FIG-001
SHEET 01 / 06
renderers
24
built-in
html tags
83
allow/deny
per chunk
~3ms
median streaming
tarball
79.5kB
packed (npm gz)
runtime deps
0
zero dependencies
licence
MIT
on GitHub
FIG-002 / STREAMING

stream AI responses in real-time.

Render ChatGPT, Claude, and Gemini responses as they stream in. Smart token diffing keeps each update at a median ~3ms — well under the 60fps budget.

file · llm-streaming.svelte avg 0ms peak 0ms chunks 0/— ○ IDLE
SRC / STREAMING
OUT / RENDERED
FIG-003 / CAPABILITIES

why svelte-markdown.

The most complete markdown renderer for Svelte 5 applications.

№ 01 / 06

Full Markdown Support

GitHub Flavored Markdown with 24 built-in renderers for headings, tables, code blocks, lists, and more.

№ 02 / 06

HTML Tag Rendering

83 HTML tags supported with allow/deny controls to filter exactly which tags render.

№ 03 / 06

Custom Renderers

Override any renderer with your own Svelte components for full control over markdown output.

№ 04 / 06

Svelte 5 Snippets

Override renderers inline with Svelte 5 snippets — no separate component files needed.

№ 05 / 06

TypeScript First

Full type safety with generics. All props, renderers, and options are properly typed.

№ 06 / 06

AI Agent Output

Render streaming HTML and markdown from Claude Code, ChatGPT, and agentic workflows — with XSS defaults, sanitization-aware streaming, and low-latency updates (median ~3ms, well under the 60fps budget).

FIG-004 / PLAYGROUND

live playground.

Edit markdown on the left, see it rendered on the right.

editor.md

Welcome to Markdown 👋

Hey! This is a fun example of mixing markdown and HTML together.

Things I love

  1. Writing in bold and italic
  2. Streaming tokens in real-time
  3. Tables that just work
FeatureMarkdownHTML
Boldtexttext
Linksnpmgithub

Happy coding!

FIG-005 / COMPARISON MATRIX

how we compare.

Honest, side-by-side comparisons with every major Svelte markdown library and editor.

librarycategorystreaming htmlsvelte 5custom renderersallow/deny htmlread more
@humanspeak/svelte-markdown ●rendereryesyesyesyesthis row
MDsveXPreprocessornoyesVia rehype pluginsread more
TiptapRich Text EditornoVia node viewsVia schemaread more
markdown-itMarkdown ParsernoToken stream manipulationnoread more
markedMarkdown ParsernoToken manipulationnoread more
MilkdownWYSIWYG Markdown EditornoVia ProseMirror nodesVia ProseMirror schemaread more
svelte-exmarkdownRuntime RenderernoyesVia rehype pluginsread more
CartaMarkdown Editor + ViewernoVia pluginsVia rehype-sanitizeread more
ByteMDMarkdown EditornoVia pluginsVia sanitize schemaread more
unified / remarkContent Processing PipelinenoAST transformersnoread more
view all comparisons →
FIG-006 / EXAMPLES

explore interactive examples.

See agent streaming, custom renderers, HTML filtering, marked extensions, Mermaid diagrams, and more — all with live editors.

SET / JETBRAINS MONO + INTER
HUMANSPEAK · 2026
MIT LICENCE
● 1.5.0
SHEET 06 / 06
END OF DOCUMENT
↩ TO TOP