Markdown
v1.0.13Updated 20 Oct 2026Themed markdown renderer with GFM tables, KaTeX math, lazy Mermaid (securityLevel:strict), remote-rendered PlantUML SVG, syntax-highlighted code, and task lists. Output is sanitised via DOMPurify.
Preview
Live · 13 stories▸Why this is recommendedmarkdownhtmlcontentgfm+7
Markdown — basic.
- ✓Help / docs surfaces
- ✓Comment / note rendering
- ✓AI / agent streaming response rendering
- ✓Wiki pages
- GFM tables + strikethrough + task lists
- KaTeX inline + block math
- Mermaid diagrams (lazy-loaded, securityLevel:strict)
- PlantUML diagrams (remote SVG)
- Syntax-highlighted code blocks (with copy button)
- Task lists with checkboxes
- Sanitised via DOMPurify (XSS-safe)
- Optional line numbers in code blocks
- format="html": sanitised raw-HTML rendering with themed typography
- i18n labels prop (MarkdownLabels — every built-in string overridable)
- Pass-through props (data-* and the rest) land on the root of EVERY branch — the markdown document, the html document, the loading skeleton and the empty placeholder — so an id an e2e or audit tool reads never disappears while the component is busy or has nothing to show. They are spread first, so they cannot overwrite the wiring the component sets itself (data-slot, the state roles, className, style, ref)
- ✕Plain unstyled text (use Typography)
- ✕Form labels (use Label)
Install
Ask your agent, or call the MCP tool directly. The resolved bundle is written into your project.
Usage
Tick variants in the left menu — each adds a tab with that variant’s real story source, the same code the preview above renders.
Props
sourceMarkdown source (or an HTML body when format="html")
yesformatInput format — html renders DOMPurify-sanitised markup with themed typography (default markdown)
—lineNumbersShow line numbers in code blocks
—mermaidRender mermaid code blocks (default true)
—plantumlRender plantuml code blocks via the configured server (default true)
—labelsOverride built-in UI strings (copy button + toasts, diagram loading/error fallbacks, heading anchor aria) for i18n
—...propsEvery remaining standard div attribute (data-* hooks, id, style, title, aria-*, ref, handlers) is spread onto the root of whichever branch renders — document, html, loading and empty. The spread goes FIRST, so data-slot and the loading status role can never be clobbered. A caller-supplied emptyState node is still rendered verbatim, with no wrapper of our own (fb_5c6ffd6a)
—