CodeBlock
Markdown for agentsSyntax-highlighted code with a language label and one-click copy. Used internally by Response and available standalone.
npx slipstream-ui@latest add code-blockCopy feedback
ts
import { Conversation } from '@slipstream-ui/ai';export function Chat() {return <Conversation messages={messages} />;}
Last copied at: —
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| code | string | — | Raw code to display. |
| language | string | 'tsx' | Prism language identifier. |
| showCopyButton | boolean | true | Show/hide the copy control. |
Accessibility
- Copy button carries an aria-label that flips to "Copied".
- Language label is plain text; code remains selectable.