Black Friday: 30% off Pro

Get 30% off

Updated

OTP Input

Pro

Preview

Customize

Scramble tick45ms
Lock stagger90ms
Hold1300ms

Installation

Pro

OTP 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

  1. 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}" }
        }
      }
    }
  2. Put your key in .env.local and add that file to .gitignore:
    .env.local
    UIBRIK_LICENSE=your-license-key
  3. Install it:
    Terminal
    npx shadcn@latest add @uibrik-pro/otp-input

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.