# ArtifactPreview

Read-only previews of documents and bounded tables.

- **Use it for**: Read-only previews of documents and tables.
- **Not for**: A panel with actions. Try [ArtifactPanel](https://unseenui.com/components/artifact-panel/).

## Installation

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

## Usage

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

<ArtifactPreview variant="document" artifact={artifact} />
```

## All props

| Prop | Type | Description |
| --- | --- | --- |
| `artifact` (required) | `Artifact` |  |
| `className` | `string` |  |
| `tableLabel` | `string` |  |
| `variant` | `"code" \| "document" \| "compact"` |  |

## 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-preview/
