Back to Components
Inputs
OTP Input
A 6-digit one-time password input with auto-focus navigation. Supports paste, backspace navigation, and keyboard arrows.
Dependencies
- clsx
- tailwind-merge
Files
- components/ui/otp-input.tsx
Installation
Using shadcn CLI
npx shadcn add otp-input --url https://ui.hampton.ioManual installation
Copy the component file to your project and install dependencies:
npm install clsx tailwind-merge