# Avatar Picker

Spin a coin or pick a face. It lands on the nearest one with real physics.

Tier: Free

## Installation

```bash
npx shadcn add @fetaui/avatar-picker
```

## Usage

```tsx
import { AvatarPicker } from '@fetaui/components/avatar-picker'

export function Example() {
  return <AvatarPicker options={[{ person: 'mira', name: 'Mira Vale' }]} onContinue={save} />
}
```

## API

| Prop | Type | Default |
|---|---|---|
| options | { person, name }[] | required |
| title, hint, spinningHint | string |  |
| defaultName | string |  |
| onContinue | ({ person, name }) => void |  |
| animated | boolean | true |

## When to use

- During onboarding, when an account has no photo yet.

## When not to use

- When people already have a photo: use Avatar Upload.

## Accessibility

- The coin is a slider, with the face name as its value.
- Faces are a radio group.
- Continue waits for a name.

## Motion

- Half a turn per face, on a 140 / 22 spring.
- A flick carries on, then the spring takes the nearest face. A shade sweeps across the edge.
- The picked badge pops in.
- With reduced motion, the coin steps one face per arrow or swipe and never spins.
