
Branch Thread
AI chat
Search by name, tag, category or type
Source and install need .
pnpm dlx shadcn@latest add @assembli/artifact-panelSide panel for a file an assistant generated: a Preview / Code toggle with a sliding pill, a version pager, copy, download, expand and close. Code has line numbers and light syntax colour; while streaming it writes itself with a caret and stays on Code, and lines a new version changed flash in the gutter. Preview renders a React node per version.
Other props pass through to the root element.
versions*
ArtifactVersion[]
version
number
Index into versions. Defaults to the latest.
onVersionChange
(index: number) => void
streaming
boolean
Default false
True while the latest version is still being written. Locks the panel to Code and follows the last line.
view
ArtifactView
defaultView
ArtifactView
Default "preview"
onViewChange
(view: ArtifactView) => void
title
string
expanded
boolean
onExpandedChange
(expanded: boolean) => void
onClose
() => void
| Description | |||
|---|---|---|---|
| versions* | ArtifactVersion[] | – | |
| version | number | – | Index into |
| onVersionChange | (index: number) => void | – | |
| streaming | boolean | false | True while the latest version is still being written. Locks the panel to Code and follows the last line. |
| view | ArtifactView | – | |
| defaultView | ArtifactView | "preview" | |
| onViewChange | (view: ArtifactView) => void | – | |
| title | string | – | |
| expanded | boolean | – | |
| onExpandedChange | (expanded: boolean) => void | – | |
| onClose | () => void | – |

AI chat

AI chat

AI chat

AI chat