NexusUI

OTP Input

Component

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

    991
  • Chat Messages

    Chat Messages

    339
  • Cinematic Logo Cloud

    Cinematic Logo Cloud

    164
  • Infinite Moving Cards

    Infinite Moving Cards

    162
  • Shooting Stars Grid

    Shooting Stars Grid

    159
  • Logo Clouds

    Logo Clouds

    113
  • Image Trail

    Image Trail

    94

Explore more