Overview
TheMarkdownRenderable component renders Markdown content with full support for tables, code blocks, inline formatting, and more. It uses the marked parser internally and provides syntax highlighting for code blocks via Tree-sitter.
Basic Usage
Props
string
default:"''"
Markdown content to render.
SyntaxStyle
required
Syntax styling configuration for markdown elements and code blocks.
boolean
default:"true"
Hide formatting markers (e.g.,
**, *, “, []()).When true: **bold** → boldWhen false: **bold** → **bold**TreeSitterClient
Tree-sitter client for syntax highlighting code blocks. Uses default client if not provided.
boolean
default:"false"
Enable streaming mode for incremental content updates. Keeps trailing tokens unstable to handle incomplete content.
MarkdownTableOptions
Configuration for rendered markdown tables.
(token: Token, context: RenderNodeContext) => Renderable | undefined
Custom node renderer. Return a Renderable to override default rendering, or undefined to use default.
Table Options
'content' | 'full'
default:"'full'"
Column sizing strategy:
'content': Columns fit to intrinsic content width'full': Columns expand to fill available width
'uniform' | 'proportional'
default:"'proportional'"
Column fitting method when shrinking constrained tables.
'none' | 'char' | 'word'
default:"'word'"
Text wrapping strategy for table cell content.
number
default:"0"
Padding applied on all sides of each table cell.
boolean
default:"true"
Enable/disable table border rendering.
BorderStyle
default:"'single'"
Border style for markdown tables (
'single', 'double', etc.).ColorInput
Border color. Defaults to conceal style color.
boolean
default:"true"
Enable selection support on markdown tables.
Supported Markdown Features
Headings
Text Formatting
Links
Lists
Blockquotes
Code Blocks
Tables
Horizontal Rules
Methods
clearCache()
Force re-render by clearing the parse cache.refreshStyles()
Re-render blocks with updated styles without rebuilding parse state.Examples
GitHub Dark Theme
Markdown with Tables
Streaming Mode
Custom Table Styling
Conceal Toggle
Custom Node Renderer
Syntax Style Groups
Markdown uses the following syntax style groups:markup.heading,markup.heading.1throughmarkup.heading.6markup.bold,markup.strongmarkup.italicmarkup.listmarkup.quotemarkup.raw,markup.raw.block,markup.raw.inlinemarkup.link,markup.link.label,markup.link.urlpunctuation.specialconceal(for concealed formatting markers)default
Properties
content
Get or set the markdown content.syntaxStyle
Get or set the syntax style.conceal
Get or set conceal mode.streaming
Get or set streaming mode.tableOptions
Get or set table rendering options.Performance
- Uses AST-based parsing with
markedfor accurate Markdown parsing - Implements caching for repeated content to avoid redundant parsing
- Smart width calculation accounting for concealed characters
- Incremental rendering in streaming mode
- Efficient table rendering with change detection