vsunified / remark.
AST Pipeline vs Component Renderer
at a glance.
Compare unified/remark and @humanspeak/svelte-markdown: AST content pipelines versus a direct marked-based Svelte 5 renderer with practical defaults.
side-by-side.
Every surface that matters, compared without spin.
| feature | @humanspeak/svelte-markdown | unified / remark |
|---|---|---|
| Svelte 5 Native | yes | no |
| TypeScript Support | yes | yes |
| Component Output | Svelte components | HTML string (rehype-stringify) |
| Custom Renderers | Svelte components | AST transformers |
| Token Caching | yes | Manual |
| Plugin Ecosystem | Marked extensions | 200+ remark/rehype plugins |
| LLM Streaming Mode The unified ecosystem has a separate unified-stream package, but not a built-in Svelte markdown streaming mode. | writeChunk() / resetStream() | Via unified-stream |
| Streaming HTML Output unified-stream chunks string-mode markdown but does not reconcile partial nested HTML blocks across chunks — that piece is left to the application. | Partial blocks reconcile when </tag> arrives | no |
| Math (KaTeX) | Built-in extension (markedKatex) | Via remark-math + rehype-katex |
| AST Access | no | yes |
| Learning Curve | Minimal | Steep (AST concepts) |
| Bundle Size | ~15KB | ~30KB+ (unified + remark + rehype) |
| Setup | One component | Pipeline assembly required |
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
- +Dead simple API — no pipeline assembly
- +Lighter bundle — no AST infrastructure
- +Renders directly to Svelte components
- +Massive plugin ecosystem (200+ remark/rehype plugins)
- +Full AST access for deep content transformation
- +Powers MDsveX, Gatsby, Next.js, and many others
- +Framework-agnostic content pipeline
- +Content linting, validation, and transformation
where each falls short.
- −Smaller community (newer project)
- −Runtime-only (no build-time optimization)
- −No AST access for deep transformations
- −Smaller plugin ecosystem than unified
- −Not a component — outputs HTML strings requiring {@html}
- −Steep learning curve (AST, visitors, transformers)
- −Requires pipeline assembly with multiple packages
- −Larger bundle footprint
- −No Svelte-specific features
the honest call.
Choose unified/remark when you need deep AST transformations, content linting, or access to the massive plugin ecosystem. Choose @humanspeak/svelte-markdown for a simple, Svelte-native rendering experience that just works.
read more.
Every head-to-head, with the same matrix + pros / cons + verdict format.
Build-Time Preprocessor vs Runtime Component
read comparison ↗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 ↗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