# OTP Form

A one time code card. Verify waits for all six digits, and a wrong code keeps them to fix.

Tier: Free

## Installation

```bash
npx shadcn add @fetaui/otp-form
```

## Usage

```tsx
import { OTPForm } from '@/components/fetaui/otp-form'

export function Example() {
  return <OTPForm onVerify={verifyCode} onResend={resendCode} />
}
```

## API

| Prop | Type | Default |
|---|---|---|
| onVerify | (code) => Promise<boolean> | required |
| onResend | () => void |  |
| resendAfter | seconds | 60 |
| help | { text, action, onClick } |  |
| title, description | ReactNode |  |
| errorText | string | That code did not match |
| animated | boolean | true |
| className | string |  |

## When to use

- For email or text verification in a sign in flow.

## When not to use

- For the field alone: use Input OTP.

## Accessibility

- Status is a live region.
- A code pastes into the field like any text, with no clipboard permission.

## Motion

- Verify shows its loader while checking.
- Messages swap with a blur.
- The countdown keeps running with reduced motion, because it is status.
