Markdown
Headless Markdown renderer. Streaming-aware. Style via data-ak-markdown.
Renders a string of Markdown content. When streaming is true the root element
receives data-ak-streaming so you can animate incomplete text (e.g. a blinking
cursor) without any inline styles.
The component is intentionally minimal β it renders the raw content string into
a div. Wire a Markdown parser (e.g. react-markdown, marked) inside your
own theme layer if you need HTML output.
#Props
| Prop | Type | Default | Description |
|---|---|---|---|
content | string | β | Markdown string to display |
streaming | boolean | false | Marks the element as actively streaming |
#Example
import { Markdown } from '@agentskit/react'
export function AssistantBubble({ part }) {
return (
<Markdown
content={part.text}
streaming={part.streaming}
/>
)
}#data-ak-markdown
The root div always carries data-ak-markdown. When streaming is true
it also receives data-ak-streaming="true".
[data-ak-markdown] {
line-height: 1.6;
white-space: pre-wrap;
}
[data-ak-markdown][data-ak-streaming="true"]::after {
content: 'β';
animation: blink 1s step-start infinite;
}#Per-framework
| Framework | Import |
|---|---|
| React | import { Markdown } from '@agentskit/react' |
| Ink | import { Markdown } from '@agentskit/ink' |
#Related
- Message β hosts
Markdownfor assistant text parts - CodeBlock β companion for fenced code blocks
- data-attributes β full
data-ak-*reference - Theming
Explore nearby
- PeerUI + hooks
Every AgentsKit UI binding exposes the same contract. Pick the framework; the API stays the same.
- PeeruseChat
The one hook every framework binding exposes. Same input, same return, same events.
- PeerChatContainer
Headless scrollable transcript container. Auto-scroll on new messages, virtualized-ready.