Themes
- Default
- Catppuccin
- Dracula
- High Contrast
- High Contrast Light
- Monokai
- Nord
- One Dark
- Solarized
- Tokyo Night
- AMOLED
- Aura
- Ayu
- Carbonfox
- Catppuccin Frappe
- Catppuccin Macchiato
- Cobalt2
- Cursor
- Everforest
- Flexoki
- GitHub
- Gruvbox
- Kanagawa
- Lucent Orng
- Material
- Matrix
- Mercury
- Night Owl
- OC-2
- One Dark Pro
- OpenCode
- Orng
- Osaka Jade
- Palenight
- Rose Pine
- Shades of Purple
- Synthwave '84
- Vercel
- Vesper
- Zenburn
Utility
AI
Terminal
Installation
$ pnpm dlx shadcn@latest add @termcn/markdown
Usage
import { Markdown } from "@/components/ui/markdown";<Markdown>{`# Welcome\n\nThis is **bold** and *italic* text.`}</Markdown>Examples
Streaming
While tokens arrive, enable streaming to blink a cursor after the last line and auto-close an odd number of Markdown fenced code blocks so partial streams still render.
Terminal
import { Markdown } from "@/components/ui/markdown";
export function MarkdownStreamingDemo() {
return (
<Markdown streaming cursor="▌">
{"## Streaming\n\n```ts\nconst answer = "}
</Markdown>
);
}API Reference
Markdown
| Prop | Type | Default |
|---|---|---|
children | string | required |
width | number | - |
streaming | boolean | false |
cursor | string | "▌" |