# Vault — Animated UI Component for React

> Dome-style circular drag gallery on a CSS 3D perspective ring — drag, throw, or scroll to spin with inertia and detent snapping while off-focus panels rest in museum duotone and the front panel blooms to full color. Arrow keys rotate; panels are focusable with announced captions.

- Page: https://crucibleui.com/components/utility/vault
- Category: [utility](https://crucibleui.com/components/utility)
- Tier: pro (one-time purchase, see https://crucibleui.com/pricing)
- Engine: gsap
- npm dependencies: gsap

## Install

```bash
npx shadcn@latest add @crucible/vault
```

Pro install requires adding the token-bearing `@crucible` registry to components.json (issued at https://crucibleui.com/account after purchase).

Import from `@/components/crucible/vault`.

## Props (`VaultProps`)

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `items?` | `VaultItem[]` | `a built-in set of gradient artworks` | Panels to arrange around the ring. |
| `radius?` | `number` | `computed from panel width and item count so panels never overlap` | Ring radius in px (distance from center to each panel). |
| `autoRotate?` | `number` | `4` | Idle drift speed in degrees per second. Set 0 to disable. Pauses on hover, focus, and interaction. |
| `panelWidth?` | `number` | `150` | Panel width in px. |
| `panelHeight?` | `number` | `210` | Panel height in px. |
| `onItemClick?` | `(index: number, item: VaultItem) => void` | — | Fires when the front-facing panel is clicked. Clicking any other panel rotates it to the front. |
| `paused?` | `boolean` | `false` | Halts the idle auto-rotation (drag, wheel, and keys still work). |
| `label?` | `string` | `"Drag gallery"` | Accessible name for the gallery. |

Also accepts: `React.ComponentPropsWithoutRef<"div">`.

## Usage example

```tsx
"use client";

import { Vault } from "@/components/crucible/vault";

export default function VaultDemo() {
  return (
    <div className="relative isolate flex h-full min-h-[360px] w-full items-center justify-center overflow-hidden rounded-xl bg-neutral-950">
      <div
        aria-hidden
        className="pointer-events-none absolute inset-0 bg-[radial-gradient(ellipse_at_50%_35%,rgba(255,255,255,0.05),transparent_65%)]"
      />
      <div className="relative z-10 flex w-full flex-col items-center gap-2">
        <Vault panelWidth={132} panelHeight={186} className="w-full" />
        <p className="pointer-events-none text-center text-sm text-neutral-500">
          Drag to spin — throw it, scroll it, or use the arrow keys.
        </p>
      </div>
    </div>
  );
}
```

## Accessibility & performance

Honors `prefers-reduced-motion` with a designed static frame or fade (never a blank box) and passes `className` through.
