Updated
OTP Input
ProCustomize
Scramble tick45ms
Lock stagger90ms
Hold1300ms
Installation
ProOTP Input is a Pro component
Sign in to see the source, or install it with a license key. The live preview and props above are free to explore.
Install with a key
- Add the Pro registry to
components.json:components.json { "registries": { "@uibrik-pro": { "url": "https://uibrik.com/r/pro/{name}.json", "headers": { "Authorization": "Bearer ${UIBRIK_LICENSE}" } } } } - Put your key in
.env.localand add that file to.gitignore:.env.local UIBRIK_LICENSE=your-license-key - Install it:
Terminal npx shadcn@latest add @uibrik-pro/otp-input
Loading your installation…
Usage
import { OTPInput } from "@/components/uibrik/otp-input/otp-input";<OTPInput label="Verification Code" correctCode="123456" scrambleSpeed={45} lockStagger={90} holdDuration={1300}/>Where to use OTP Input
Two-factor codes
Boxes that merge and scramble into a pass or fail result make verification clear.
Pairs with Auth Forms
Phone sign-in
A clear result state helps users know immediately whether to retype.
Pairs with Phone Input
Password reset
A one-time code field with a decisive outcome reduces support requests.
Pairs with Password Strength
Props
OTPInput- label
- Type string
- "Verification Code"
- Heading above the boxes.
- correctCode
- Type string
- "123456"
- The six-digit code that passes.
- scrambleSpeed
- Type number
- 45
- Milliseconds between scramble frames.
- lockStagger
- Type number
- 90
- Milliseconds between letters locking in.
- holdDuration
- Type number
- 1300
- How long the result shows before resetting.