FIG-001 · MASTHEAD
// compare / svelte-markdown vs vs-unified-remark

vsunified / remark.

AST Pipeline vs Component Renderer

FIG-001
SHEET 01 / 07
FIG-002 / OVERVIEW

at a glance.

Compare unified/remark and @humanspeak/svelte-markdown: AST content pipelines versus a direct marked-based Svelte 5 renderer with practical defaults.

FIG-003 / FEATURE MATRIX

side-by-side.

Every surface that matters, compared without spin.

feature@humanspeak/svelte-markdownunified / remark
Svelte 5 Native yesno
TypeScript Support yesyes
Component Output Svelte componentsHTML string (rehype-stringify)
Custom Renderers Svelte componentsAST transformers
Token Caching yesManual
Plugin Ecosystem Marked extensions200+ 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> arrivesno
Math (KaTeX) Built-in extension (markedKatex)Via remark-math + rehype-katex
AST Access noyes
Learning Curve MinimalSteep (AST concepts)
Bundle Size ~15KB~30KB+ (unified + remark + rehype)
Setup One componentPipeline assembly required
FIG-004 / STRENGTHS

where each shines.

▣ svelte markdown 12
  • +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
▢ unified / remark 5
  • +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
FIG-005 / LIMITATIONS

where each falls short.

▣ svelte markdown 4
  • Smaller community (newer project)
  • Runtime-only (no build-time optimization)
  • No AST access for deep transformations
  • Smaller plugin ecosystem than unified
▢ unified / remark 5
  • 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
FIG-006 / VERDICT

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.

FIG-007 / MORE

read more.

Every head-to-head, with the same matrix + pros / cons + verdict format.

SET / JETBRAINS MONO + INTER
HUMANSPEAK · 2026
MIT LICENCE
try
svelte markdowninstall in 30 seconds
SHEET 07 / 07
END OF DOCUMENT
↩ ALL COMPARISONS