Utility
Terminal
Installation
$ pnpm dlx shadcn@latest add @termcn/ink/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
API Reference
Markdown
| Prop | Type | Default |
|---|---|---|
children | string | required |
width | number | - |
streaming | boolean | false |
cursor | string | "▌" |
Notes
Accessibility
termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim.
- Screen reader: Ink labels and semantic state expose the component without relying on visual styling alone.