// docs / examples
usage examples.
Curated patterns for integrating @humanspeak/svelte-markdown — short walkthrough
docs paired with live demos. Items marked live jump to interactive editors under /examples.
01
Getting Started
2 items02
Customization
2 items03
Advanced
4 itemsWALKTHROUGH ↗
Parsed Callback
Access parsed token data via the parsed callback prop for debugging or processing.
WALKTHROUGH ↗
Marked Extensions
Integrate third-party marked extensions like KaTeX math rendering with custom Svelte renderers.
LIVE DEMO ↗
Mermaid Diagrams
Render Mermaid diagrams with a custom marked extension and async component renderers.
LIVE DEMO ↗
LLM Streaming
Simulate real-time AI response streaming with adjustable speed, jitter, and chunk modes.
04
Quick Reference
5 patterns| Use case | Usage | Notes |
|---|---|---|
| Blog posts | <SvelteMarkdown source={post.body} /> | Full block rendering |
| Inline labels | <SvelteMarkdown source={label} isInline /> | No wrapping <p> tags |
| Sanitized content | <SvelteMarkdown {source} renderers={{ html: allowHtmlOnly([...]) }} /> | Restrict HTML tags |
| Custom styling | <SvelteMarkdown {source} renderers={{ heading: MyHeading }} /> | Override specific renderers |
| Token inspection | <SvelteMarkdown {source} parsed={handleTokens} /> | Access AST tokens |