Input OTP
An accessible one-time password input with individual character slots. Built on input-otp.
$cookest-ui add input-otp
6-Digit OTP
Standard 6-digit one-time password field for verification.
Verify your Cookest account
We sent a 6-digit code to chef@example.com
4-Digit PIN
Shorter OTP for PIN entry — for recipe lock screens.
Enter your 4-digit recipe collection PIN
| Prop | Type | Default | Description |
|---|---|---|---|
maxLength | number | — | Total number of characters the OTP input accepts. |
value | string | — | Controlled value of the OTP input. |
onChange | (value: string) => void | — | Callback when the value changes. |
InputOTPSlot | { index: number } | — | Each individual character slot. Must have an index. |
InputOTPSeparator | — | — | A visual separator (dash) between slot groups. |