Markdown
Markdown drawn with Kino’s own parts, that reads well while a reply is still being written. New text shows the moment it arrives, and marks put a citation after the text it cites.
Examples
Default
Give it the text as its children. Headings, lists, tables, code and links take Kino’s own parts.
Citations
A mark puts its content after a range of the source. Point at a citation, or focus it, and the text it cites lights up.
Streaming
Pass streaming while the text arrives: a cut fence is code still being written, a half table shows its rows and a half link its text, with no stray markers. stopped keeps a reply cut short the same way.
Installation
npx shadcn@latest add https://kinoui.com/r/markdown.json- Files
lib/reduce-motion.tslib/choice.tslib/refs.tscomponents/kino/checkbox.tsxlib/resize.tslib/swap.tsxcomponents/kino/spinner.tsxcomponents/kino/button.tsxlib/popup.tslib/glide.tsxlib/keys.tsxcomponents/kino/kbd.tsxcomponents/kino/tooltip.tsxlib/announce.tscomponents/kino/copy-button.tsxlib/run-progress.tslib/highlight.tslib/pill.tslib/scroll.tscomponents/kino/tabs.tsxlib/syntax.tslib/fold.tslib/cut.tsxlib/code-lines.tsxlib/controllable.tscomponents/kino/code-block.tsxcomponents/kino/separator.tsxcomponents/kino/collapsible.tsxlib/number-format.tslib/column-resize.tslib/flow.tslib/track.tscomponents/kino/progress.tsxlib/placeholder.tscomponents/kino/skeleton.tsxlib/dates.tslib/pages.tslib/table-data.tsxcomponents/kino/table.tsxlib/markdown-parse.tslib/mark-lights.tscomponents/kino/markdown.tsx- Packages
@tanstack/react-table@~9.3.1@ui-sdk/core@ui-sdk/reactclass-variance-authorityshiki- Global CSS
- the feels, the density tokens, the shape tokens and the success and warning colours
New to Kino? Installation covers what your project needs first and the @kino namespace.
API reference
Props
A div that draws its children as Markdown: CommonMark, with GFM’s tables, task lists, strikethrough and autolinks. Other props go to the div.
Data attributes
Accessibility
- Headings, lists, quotes and tables are the HTML elements they stand for, so a screen reader can move by them;
headingLevelkeeps a reply’s headings in the page’s outline. - A task list’s box is a mark, not a control: it takes no focus, and a screen reader hears “Done” or “To do” before the task.
- Each paragraph, heading, list, item and cell takes
dir="auto", so a reply in another script lays out its own way in any page. - A link opens only
http,https,mailtoandteladdresses; any other shows as text, as raw HTML does. - A lit range takes the system highlight in forced colours.
For agents
Nothing here takes input, so snapshot() lists nothing.