Skip to content

Markdown

Renders raw markdown as styled HTML with syntax highlighting

Default

Usage

tsx
import { Markdown } from '@tryvienna/ui'

<Markdown content="sampleMarkdown" />

Examples

Default

Default
tsx
<Markdown content="sampleMarkdown" />

Small Size

Small Size
tsx
<Markdown content="sampleMarkdown" size="sm" />

Code Highlighting

Code Highlighting
tsx
<Markdown content="codeMarkdown" />

Variants

NameOptionsDefault
sizesm | md | lgmd

API Reference

Markdown

PropTypeDefaultDescription
contentstring | undefined-
htmlstring | undefined-
size"sm" | "lg" | "md" | null | undefined-

Data Attributes

Componentdata-slot
Markdown"markdown"