Markdown & HTML Renderer
"
@humanspeak/svelte-markdownis a powerful, customizable markdown renderer for Svelte with TypeScript support.It's built for streaming AI agent output from Claude Code, ChatGPT, and agentic workflows, and offers XSS-safe defaults and token caching."
- ๐ Secure HTML parsing via HTMLParser2 with built-in XSS defaults (protocol allowlist,
on*handler stripping)- ๐ Full markdown syntax support through Marked
- ๐ช Complete TypeScript support with strict typing
- ๐ Svelte 5 runes compatibility
- โ๏ธ Inline snippet overrides — customize renderers without separate files
- ๐จ Customizable component rendering system
- โฟ WCAG 2.1 accessibility compliance
- ๐ฏ GitHub-style slug generation for headers
- ๐งช Comprehensive test coverage (vitest and playwright)
- ๐งฉ First-class marked extensions support via extensions prop (e.g., KaTeX math, alerts)
- โก Intelligent token caching (50-200x faster re-renders)
- ๐ก LLM streaming mode with incremental rendering (~1.6ms avg per update)
- ๐ผ๏ธ Smart image lazy loading with fade-in animation