Filigran

MarkdownRenderer Example

This component supports both light and dark color modes via the colorMode prop. Consumers should pass it synchronized with their own theme.

Dark mode

Hello from MarkdownRenderer

This component renders GitHub Flavored Markdown, including:

FeatureSupported
Bold / italic✓
Tables (GFM)✓
Strikethrough✓

No more silent rendering bugs. GFM is now native.

Light mode

Hello from MarkdownRenderer

This component renders GitHub Flavored Markdown, including:

FeatureSupported
Bold / italic✓
Tables (GFM)✓
Strikethrough✓

No more silent rendering bugs. GFM is now native.

How to use this markdown-renderer

Props

NameTypeDefaultDescription
sourcestring—Markdown content to render. Required.
colorModeenum ("light" | "dark")"light"Color mode propagated via the data-color-mode attribute, used by the internal markdown rendering.
classNamestring—Optional CSS class merged on the wrapper div.

Playground

Import from @filigran/ui :

Import {MarkdownRenderer} from '@filigran/ui/clients'

<MarkdownRenderer
source={`# Markdown demo

**Bold** text, *italic*, and a [link](https://filigran.io).

| Col 1 | Col 2 |
|-------|-------|
| A     | B     |

- [x] Task done
- [ ] Task pending
`}
  colorMode="dark"
/>