vsmdsvex.
Build-Time Preprocessor vs Runtime Component
at a glance.
Compare MDsveX and @humanspeak/svelte-markdown: build-time .svx preprocessing versus runtime Svelte 5 markdown rendering, caching, and HTML control.
side-by-side.
Every surface that matters, compared without spin.
| feature | @humanspeak/svelte-markdown | MDsveX |
|---|---|---|
| Svelte 5 Native | yes | yes |
| TypeScript Support | yes | Partial |
| Runtime Rendering MDsveX is build-time only | yes | no |
| Dynamic Content Cannot render user-supplied markdown | yes | no |
| Custom Renderers | yes | yes |
| Token Caching Not needed — parsed at build time | yes | no |
| LLM Streaming Mode MDsveX is build-time only, so there is no runtime markdown streaming mode. | writeChunk() / resetStream() | no |
| Streaming HTML Output MDsveX compiles at build time — there is no runtime stream that could resolve partial HTML blocks across chunks. | Partial blocks reconcile when </tag> arrives | no |
| HTML Tag Control | 84 tags with allow/deny | Via rehype plugins |
| Markdown in Components | yes | yes |
| Components in Markdown | no | yes |
| Frontmatter MDsveX has built-in frontmatter parsing | no | yes |
| Math (KaTeX) | Built-in extension (markedKatex) | Via remark-math + rehype-katex |
| Diagrams (Mermaid) | Built-in extension (markedMermaid) | Via rehype-mermaid |
| GitHub Alerts | Built-in extension (markedAlert) | Via remark-github-alerts |
| Code Highlighting | Via marked extensions | Built-in (Shiki/Prism) |
| Remark/Rehype Plugins | no | yes |
where each shines.
- +Svelte 5 runes-native — built for runes, not retrofitted
- +TypeScript-first with full type safety
- +Built-in token caching (50-200x faster re-renders on repeated content)
- +LLM streaming with imperative writeChunk() / resetStream() API
- +23 markdown renderers + 84 HTML tag renderers — every override is a Svelte snippet
- +First-class extensions: KaTeX math, Mermaid diagrams, GitHub alerts, footnotes
- +Built-in XSS protection — protocol allowlist, event-handler stripping, attribute sanitization
- +Allow/deny utilities (allowHtmlOnly, excludeRenderersOnly, etc.) for fine-grained control
- +Drop-in component — works anywhere in your Svelte app
- +Renders dynamic/user-supplied markdown at runtime
- +No build step required — works with any markdown string
- +Math, Mermaid, alerts, and footnotes ship as first-class extensions — no remark/rehype pipeline required
- +Simpler mental model — just pass a string, get rendered output
- +Largest Svelte markdown ecosystem (~3,000 GitHub stars)
- +Build-time optimization — zero runtime parsing cost
- +Use Svelte components directly inside markdown files
- +Rich plugin ecosystem via unified/remark/rehype
- +Built-in code syntax highlighting
- +Frontmatter parsing out of the box
where each falls short.
- −Smaller community (newer project)
- −Runtime-only (no build-time optimization)
- −Cannot embed Svelte components inside markdown content
- −No frontmatter support (parse separately if needed)
- −No built-in code syntax highlighting (use a marked extension)
- −Cannot render dynamic/user-supplied markdown
- −Content must exist at build time as .svx files
- −Adds build complexity (preprocessor configuration)
- −Not suitable for CMS content, user input, or API-fetched markdown
the honest call.
Choose MDsveX for static content sites, blogs, and documentation where markdown is known at build time. Choose @humanspeak/svelte-markdown when you need to render dynamic markdown — CMS content, user input, API responses, or any scenario where the markdown string is not known until runtime.
read more.
Every head-to-head, with the same matrix + pros / cons + verdict format.
Heavyweight Editor vs Lightweight Renderer
read comparison ↗Raw Parser vs Svelte Component
read comparison ↗The Engine Under Our Hood
read comparison ↗Plugin-Driven Editor vs Focused Renderer
read comparison ↗Two Runtime Renderers, Different Engines
read comparison ↗Editor + Viewer vs Pure Renderer
read comparison ↗Full Editor vs Pure Renderer
read comparison ↗AST Pipeline vs Component Renderer
read comparison ↗Editor Toolkit vs Ready-Made Renderer
read comparison ↗The full /compare index — every head-to-head in one place.
browse all ↗svelte markdown → install in 30 seconds