NexusUI

OTP Input

Component 16

About

Three one-time-code inputs: soft pill boxes, an underline row that fills dot by dot, and an iOS-style Messages banner that autofills the code. Paste, backspace and arrow keys all work. Part of Nexus UI: nexus-ui.com/components/otp-input

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

Code

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

Usage.tsx

import { OtpInput, OtpLine, OtpAutofill } from "@/components/ui/otp-input";

export default function Demo() {
  return (
    <div className="flex min-h-screen w-full items-center justify-center p-6">
      <div className="flex w-full max-w-md flex-col items-center gap-10"><OtpInput /><OtpLine /><OtpAutofill /></div>
    </div>
  );
}

Dependencies

More by NexusUI

View all
  • Circular Carousel

    Circular Carousel

    1.3K
  • Images Badge

    Images Badge

    1K
  • Chat Messages

    Chat Messages

    374
  • Infinite Moving Cards

    Infinite Moving Cards

    188
  • Cinematic Logo Cloud

    Cinematic Logo Cloud

    179
  • Aquarium Prompt

    Aquarium Prompt

    169
  • Shooting Stars Grid

    Shooting Stars Grid

    162
  • Pixel Atlas

    Pixel Atlas

    133

Explore more