# ArtifactPanel

A panel for generated documents and other artifacts.

- **Use it for**: A panel for generated documents and other artifacts.
- **Not for**: Inline previews. Try [ArtifactPreview](https://unseenui.com/components/artifact-preview/).

## Installation

```bash
npm install @stackunseen/ui
```

## Usage

```tsx
import { ArtifactPanel } from '@stackunseen/ui';
import '@stackunseen/ui/styles.css';

<ArtifactPanel variant="dialog" artifact={artifact} open={open} onOpenChange={setOpen} />
```

## All props

| Prop | Type | Description |
| --- | --- | --- |
| `actions` | `ReactNode` | Trusted host actions, kept outside the scrolling body and hidden on loading/error. |
| `artifact` (required) | `Artifact \| null` |  |
| `body` | `ReactNode` | Trusted host content, shown only when the selected artifact is available. |
| `className` | `string` | Added to the root element, after the component's own classes. |
| `error` | `string` |  |
| `loading` | `boolean` |  |
| `onOpenChange` (required) | `(open: boolean) => void` |  |
| `open` (required) | `boolean` |  |
| `trigger` | `ReactNode` | Trusted host control: one element that forwards Radix props/ref, with an accessible name. |
| `variant` | `"dialog" \| "sheet" \| "fullscreen"` |  |

## Keyboard

Tab reaches controls; Enter or Space activates buttons. Accordions use arrow keys, Home and End. Select menus support arrows and typeahead; Escape closes menus and dialogs and restores focus.

## Works with

[CodeTabs](https://unseenui.com/components/code-tabs/), [Snippet](https://unseenui.com/components/snippet/), [Commit](https://unseenui.com/components/commit/), [EnvironmentVariables](https://unseenui.com/components/environment-variables/), [PackageInfo](https://unseenui.com/components/package-info/), [SchemaDisplay](https://unseenui.com/components/schema-display/), [StackTrace](https://unseenui.com/components/stack-trace/), [WebPreview](https://unseenui.com/components/web-preview/), [Image](https://unseenui.com/components/image/), [FileExplorer](https://unseenui.com/components/file-explorer/), [CodeDiff](https://unseenui.com/components/code-diff/), [TerminalOutput](https://unseenui.com/components/terminal-output/)

Page: https://unseenui.com/components/artifact-panel/
