Markdown
Loading example…
Safe Markdown renderer: headings, lists, emphasis, inline code, code fences, quotes, tables and links. It builds React elements from a parsed AST, so no input ever reaches innerHTML.
Import
Section titled “Import”import { Markdown } from "@jcsoftdev/ui/ai";Single-component entry points tree-shake to just this component: @jcsoftdev/ui/ai/markdown.
<Markdown streaming={false}> {SAMPLE}</Markdown>| Prop | Type | Default | Description |
|---|---|---|---|
children * |
string |
Markdown source. Raw HTML is shown as text; only http, https and mailto links are active. | |
streaming |
boolean |
Shows a blinking caret after the last character, for streaming answers. | |
className |
string |
* marks a required prop.
Storybook stories
Section titled “Storybook stories”Source
Section titled “Source”packages/ui/src/ai/markdown/markdown.tsx