> A component of a Premium AI Canvas design system. Index of every system, component and install setup: https://aicanvas.me/llms.txt

# Artifact (Andromeda Pro)

Frames something an agent produced, such as a table or a chart, under a title bar with its actions.

- Design system: [Andromeda Pro](https://aicanvas.me/design-systems/andromeda-pro.md)
- License: Premium (proprietary)
- Install slug: `andromeda-pro-artifact`
- Page: https://aicanvas.me/design-systems/andromeda-pro/artifact

## Install

```bash
npx shadcn@latest add @aicanvas/andromeda-pro-artifact
```

Requires Premium. Without a Premium token the command writes a placeholder instead of the component.

Every Andromeda Pro component at once: `npx shadcn@latest add @aicanvas/andromeda-pro`.

Token setup: the Install section of https://aicanvas.me/llms.txt.

## Props

### Artifact

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children?` | `React.ReactNode` |  | ArtifactHeader, then ArtifactContent. |
| `className?` | `string` |  | Extra classes merged onto the frame. |
| `style?` | `React.CSSProperties` |  | Inline styles merged onto the frame. |

### ArtifactHeader

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `icon?` | `React.ComponentType<IconProps>` |  | Leading glyph naming the kind of thing the artifact is, in text.muted at 16px (the 12px title's rung on the icon-label ladder). |
| `children?` | `React.ReactNode` |  | ArtifactTitle and ArtifactDescription, stacked in the flexible column; an ArtifactActions child is lifted out to the trailing end. |
| `className?` | `string` |  | Extra classes merged onto the bar. |
| `style?` | `React.CSSProperties` |  | Inline styles merged onto the bar. |

### ArtifactText

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children?` | `React.ReactNode` |  | Content rendered inside the component. |
| `className?` | `string` |  | Extra classes merged onto the line. |
| `style?` | `React.CSSProperties` |  | Inline styles merged onto the line. |

### ArtifactAction

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label` | `string` |  | REQUIRED. The action's name: the button's aria-label and the tooltip's text. |
| `icon` | `React.ComponentType<IconProps>` |  | REQUIRED. The glyph, drawn at the sm rung (16px) by IconButton. |
| `tooltip?` | `boolean` | `true` | Show the label in a Tooltip under the button on hover and focus. It portals out of the Artifact frame (which clips) and stays inline anywhere else, such as a DrawerHeader. |
| `hideBelow?` | `'sm'\|'md'` |  | Hide the action below that breakpoint. Only for a secondary action that stays reachable elsewhere (the expanded view keeps it). |
| `onClick?` | `(e: React.MouseEvent<HTMLButtonElement>) => void` |  | What the action does. An action with no handler is a dead control: leave it out instead. |
| `disabled?` | `boolean` |  | When true, disables the control. |
| `className?` | `string` |  | Extra classes merged onto the button. |
| `style?` | `React.CSSProperties` |  | Inline styles merged onto the button. |

### ArtifactClose

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label?` | `string` | `'Close'` | The button's aria-label and tooltip text. |

## Remix prompt

The public part of this component's remix prompt. The rest of the build spec is part of Premium.

```markdown
Build **Artifact**: the frame around something an agent produced, a table, a chart or a document, with a title bar that names it and actions that each do what they say. React + TypeScript, one file, named exports `Artifact`, `ArtifactHeader`, `ArtifactTitle`, `ArtifactDescription`, `ArtifactActions`, `ArtifactAction`, `ArtifactClose`, `ArtifactContent`. Use the AI Canvas icons (`@/components/icons/<name>`, the `x` icon for close).

It is drawn to sit on a near-black ground, `oklch(0.135 0.002 286.2)`, and usually lives inside an assistant's answer panel at `oklch(0.164 0.002 286.2)`. Typeface: Manrope, falling back to the system sans. Every part takes `className`, `style` and its element's props, and forwards a ref.

A thing the agent made, not more of the conversation. It has NO border and NO corner brackets: what it holds is usually already framed (stat tiles with their own corners, a table with its own grid), and a border around them would be a frame inside a frame. It is set apart by tone instead.
```

## More Andromeda Pro components

- [Avatar](https://aicanvas.me/design-systems/andromeda-pro/avatar.md)
- [Badge](https://aicanvas.me/design-systems/andromeda-pro/badge.md)
- [Bento Grid](https://aicanvas.me/design-systems/andromeda-pro/bento-grid.md)
- [Button](https://aicanvas.me/design-systems/andromeda-pro/button.md)
- [Card](https://aicanvas.me/design-systems/andromeda-pro/card.md)
