Forms
Input OTP
A one-time-code input with one slot per character. Focus advances as you type, a paste fills every slot, and separators are yours to place.
6-Digit OTP
Import
import {
InputOTP,
InputOTPGroup,
InputOTPSlot,
InputOTPSeparator,
} from "@mikenotthepope/substrateui"Composition
InputOTP
├── InputOTPGroup
│ └── InputOTPSlot
└── InputOTPSeparatorAPI Reference
| Prop | Type | Default | Description |
|---|---|---|---|
maxLength | number | — | The total number of OTP slots. |
value | string | — | The controlled value of the OTP input. |
onChange | (value: string) => void | — | Callback fired when the OTP value changes. |