Input OTP
One cell per character, with a drawn caret in the active one.
Installation
npx shadcn@latest add @afterglow/input-otpComposition
Component structure.
InputOTP
├── InputOTPGroup
│ └── InputOTPSlot
└── InputOTPSeparatorAPI Reference
InputOTP
| Prop | Type | Default |
|---|---|---|
| containerClassName | string | - |
InputOTPSlot
One character cell. index is which position of the code it draws, so a group of four is four slots numbered 0 to 3.
| Prop | Type | Default |
|---|---|---|
| index | number | - |
Everything else is input-otp's API, documented there.