Documentation
Asgard
Getting started
Theming
Guides
Inputs & forms
Pickers
Data display
Layout & docking
Feedback & overlays
Navigation & chrome
Data display
Render markdown as themed elements.
Converts markdown text into themed elements, with syntax-highlighted code blocks.
Key features:
- Headings, paragraphs, blockquotes, lists, tables and rules
- Fenced code blocks highlighted via
SyntaxColor - Rich inline: bold, italic,
code, links and images - Three sizes and a custom
onLinkClickhandler for client-side nav
Loading preview…
When to use it
- Docs, changelogs and READMEs
- User-authored content (comments, posts)
- In-app help and release notes
Properties
| Prop | Type | Default | Description |
|---|---|---|---|
markdown | string | — | Markdown source text to render. |
size | 'small' | 'normal' | 'large' | 'normal' | Base font size for the rendered output. |
syntaxHighlight | boolean | true | Render fenced code blocks with SyntaxColor highlighting. |
codeColorMap | Record<string, string> | — | Override token colors for code blocks (merged over the theme defaults). |
onLinkClick | (href: string) => void | — | Intercept link clicks (prevents default navigation), useful for SPA routing. |
className | string | — | Class applied to the root element. |
style | CSSProperties | — | Inline style for the root element. |
Notes
- Language identifiers on fenced blocks (tsx, ts, js, json, css, html, python) map to built-in Monarch languages.
- Provide onLinkClick to route links through your client-side router instead of a full page load.
Presets