Ashish Sharma

Otp Input

Component 1

About

A 6-digit one-time code input. Auto-advances, backspaces to the previous box, accepts a pasted code, then checks it: success turns green, a wrong code shakes and clears. Try the demo code. From Caliper UI (caliperui.site).

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 } from "@/components/ui/otp-input";

export default function Demo() {
  return <OtpInput />;
}

More by Ashish Sharma

View all
  • Animated Sidebar

    Animated Sidebar

    1
  • Feedback Widget

    Feedback Widget

  • Notification Stack

    Notification Stack

  • Expandable Tabs

    Expandable Tabs

  • File Upload

    File Upload

  • Voice Orb

    Voice Orb

  • Streaming Chat

    Streaming Chat

  • Tool Approval

    Tool Approval