Search components
Find a component by name
Input OTP
One-time password input with slots.
Pattern
Use the pattern prop to restrict what can be typed, for example REGEXP_ONLY_DIGITS from input-otp.
Separator
Use InputOTPSeparator between InputOTPGroups to split the code into chunks.
Disabled
Use the disabled prop to disable the input.
Controlled
Use value and onChange to control the input.
Invalid
Set aria-invalid on the InputOTPSlots to show the error state.
Four Digits
A common pattern for PIN codes: maxLength={4} with pattern={REGEXP_ONLY_DIGITS}.
Alphanumeric
Use REGEXP_ONLY_DIGITS_AND_CHARS to accept both letters and numbers.
Form
A verification card that combines InputOTP with Field, Card and Button, using larger slots for the code.
Installation
npx shadcn@latest add @refer/input-otpUsage in the apps
Which apps install this component, whether their copy matches the registry, and which files import it.
No app imports this component. From olympus-backend@2ee40d05e, Oct 26, 2026. โIn syncโ means the app's copy matches this registry; refresh with npm run usage:build.