svelte-markdown is a markdown and HTML renderer for Svelte 5, built for streaming output from AI agents, with 24 built-in renderers and 83 supported HTML tags. It offers XSS-safe defaults, sanitization-aware streaming, and low-latency updates, making it suitable for rendering untrusted content like AI agent output. It can be extended with custom renderers, which can be overridden with Svelte components or inline Svelte 5 snippets.
It supports allow/deny controls for HTML tag filtering, letting you filter exactly which tags render. It has zero runtime dependencies and is available under the MIT license. It can be installed via npm, and the official docs provide API reference, examples, and a playground.
No comments yet.