brijr/ui

Lab

Input OTP

npx shadcn@latest add @brijr/input-otp

States

The first field has focus on load to show the active slot and caret. Click any field to see it.

focused · active slot · fake caret
empty
partial
complete
aria-invalid
disabled
disabled · empty
readOnly
required

Lengths and groups

maxLength 4 · one group
maxLength 6 · one group
maxLength 6 · 2 groups · separator
maxLength 6 · 3 groups
maxLength 8 · alphanumeric
maxLength 12 · many slots

Separator

default
icon child
text child

With label

Enter the 6-digit code we sent to your phone.

That code has expired. Request a new one.