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