# API Key

A key on a well with reveal and copy. Copied confirms for 2 s and Revoked removes the actions.

Tier: Free

## Installation

```bash
npx shadcn add @fetaui/api-key
```

## Usage

```tsx
import { ApiKey } from '@/components/fetaui/api-key'

export function Example(props) {
  return <ApiKey name="Production server" value={key} meta="Created Sep 4" />
}
```

## API

| Prop | Type | Default |
|---|---|---|
| name, value, meta | string | required |
| environment | live, test | live |
| revoked | boolean | false |
| onRoll | () => void |  |
| animated | boolean | true |

## When to use

- For showing keys in developer settings.

## When not to use

- For a one time secret after creation.

## Accessibility

- The full key stays out of the DOM until revealed or copied.
- Reveal is a toggle button with aria-pressed.
- Copied is a status message.

## Motion

- The card fades in and rises 8 px over 400 ms.
- Copied fades in over 150 ms and clears after 2 s.
- With reduced motion, both appear in place.
