Description
svelte-markdown is a Markdown and HTML renderer for Svelte 5, published on npm as @humanspeak/svelte-markdown. It is built for streaming output from AI agents such as Claude Code and ChatGPT, so text updates as tokens arrive. Smart token diffing and per-frame updates keep each update light. The library includes 24 Markdown renderers and support for 83 HTML tags, with allow and deny utilities that control which tags are rendered. Its defaults are XSS-safe, it caches tokens, and it is fully typed with TypeScript. Custom renderers can be written with Svelte 5 snippets. The package has no runtime dependencies, is about 213.5 kB packed, and is released under the MIT license with its source on GitHub. The docs include a live playground, interactive examples and llms.txt files for AI tools.…
Highlights
- Renders Markdown and HTML from streaming AI output
- 24 built-in Markdown renderers
- 83 HTML tag renderers with allow and deny lists
- XSS-safe defaults and TypeScript types
- No runtime dependencies, MIT licensed
Ratings & Reviews
No ratings yet
Be the first to rate Svelte Markdown.
People also visit
Svelte Markdown FAQ
What is svelte-markdown?
A Markdown and HTML renderer library for Svelte 5 that installs from npm as @humanspeak/svelte-markdown.
Can it render streaming AI responses?
Yes. It is built for streaming output from Claude, ChatGPT and Gemini, and it updates as the text arrives.
Is it safe to render untrusted HTML?
It ships with XSS-safe defaults, and the allow and deny utilities let you limit which HTML tags are rendered.
How do I install it?
Run npm i @humanspeak/svelte-markdown in your Svelte 5 project and check the docs for the API reference.
What are the best Svelte Markdown alternatives?
Popular alternatives to Svelte Markdown include Markstream Vue, MarkdownDisplayView and Rocketnotes. See all Svelte Markdown alternatives









