
Premium solid one-time password input with paste, validation, and separators.
npx shadcn@latest add https://ui.edbn.me/api/analytics/registry/input-otp.jsonOne-time password input built on the input-otp library. Manages focus and validation.
maxLengthnumberRequiredNumber of OTP digits
valuestringControlled input value
onChangefunctionCalled when value changes
onCompletefunctionCalled when all slots filled
patternstring (regex)Input validation pattern
disabledbooleanfalseDisable input
autoFocusbooleanfalseAuto-focus on mount
classNamestringCSS class name
Groups adjacent OTP slots visually.
classNamestringCSS class name
A single OTP character slot.
indexnumberRequiredSlot index (0-based)
classNamestringCSS class name
A visual separator between OTP groups (e.g., a dash).
classNamestringCSS class name