Back
OTP Input
Satu Visual ComponentNew
A segmented one-time-password input with auto-advance.
Installation
Add it with the CLI:
Terminal
$
Or open the Code tab above and copy it in manually — it relies on the standard cn() helper from @/lib/utils.
Usage
Set the length; onComplete fires with the full code once every box is filled. Backspace moves back.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| length | number | 4 | Number of digits. |
| onComplete | (code: string) => void | — | Called when fully filled. |
| className | string | — | Extra classes. |