Input OTP
A one-time passcode field drawn as separate slots over a single real input, so paste, autofill from a text message and screen readers all work as they would on one field.
tsx
import {
InputOTP,
InputOTPGroup,
InputOTPSlot,
InputOTPSeparator,
} from "@pestoui/core"Six digits, two groups
maxLength is the code length; each InputOTPSlot takes the index of the character it shows. Groups and the separator are layout only.
Controlled
value and onChange carry the whole code as one string. The field accepts any character until you give it a pattern — here, digits only.
4 digits to go
Props
Pesto UI · 117 documented components