AI & Agents
Artifact Panel
The side panel for what the agent made — code or a document — with versions, copy and download.
Usage
export function TabsList({ className, ...props }) {const ref = useRovingFocus({ orientation })return (<divref={ref}role="tablist"aria-orientation={orientation}{...props}/>)}
Installation
npm install @wunderui/reactThen import what you need:
import { ArtifactPanel } from "@wunderui/react"Examples
Code
Line numbers and versions.
export function TabsList({ className, ...props }) {const ref = useRovingFocus({ orientation })return (<divref={ref}role="tablist"aria-orientation={orientation}{...props}/>)}
Document
A written draft instead of code.
Tabs v2
Tabs now move focus with the arrow keys, in both orientations. Home and End jump to the first and last tab.
What changed
- Roving focus with a new useRovingFocus hook
- aria-orientation on vertical tab lists
- 7 new tests, all passing
In context
How the component is used inside real screens — the same compositions as the Usage section of the Figma page.
Artifact side panel
What the assistant wrote opens beside the chat, with its versions, copy and download.
Payment step
The saved card is the default path. Changing it stays one quiet link away.
Strings
- Button: “Pay $128.40 with Visa •••• 4242”
- Link: “Change payment method”
- Helper: “Saved Sep 12 · expires 08/28”
API Reference
| Prop | Type | Default |
|---|---|---|
| title / meta | ReactNode | — |
| versions / version / onVersionChange | string[] / string / (v) => void | no switch |
| code | string | document view |
| children | ReactNode | the document |
| onCopy / onDownload / onClose | () => void | button hidden |