boardui

Input OTP

Component

About

A one-time-code input with a monospace box per digit that supports typing, backspace navigation, arrow-key movement, paste distribution and OS autofill.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Input OTP to your project and fits it to your theme.

Code

How Input OTP is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import { InputOtp } from "@/components/ui/input-otp";

export default function InputOtpDemo() {
  return (
    <InputOtp
      aria-label="Verification code"
      onComplete={(code) => console.log("verify", code)}
    />
  );
}

More by boardui

View all
  • Social Button

    Social Button

    4
  • Modal Dialog

    Modal Dialog

    3
  • Select

    Select

    1
  • Accordion

    Accordion

    1
  • Segmented Control

    Segmented Control

  • Date Calendar

    Date Calendar

  • Composer Loader

    Composer Loader

  • Slider

    Slider