honestui

OTP Field

Forms

About

Enter a one-time code, with one box per character, paste, and autofill from messages.

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

Code

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

Usage.tsx

"use client"

import "honestui/theme.css"
import { OTPField } from "@/components/ui/honest-otp-field"

export default function OTPFieldDemo() {
  return (
    <div data-theme="light" className="flex w-fit flex-col gap-2">
      <label className="text-sm font-medium">Verification code</label>
      <OTPField length={6} />
      <p className="text-muted-foreground text-sm">
        Enter the 6-digit code we sent to your phone ending in 0142.
      </p>
    </div>
  )
}

Dependencies

More by honestui

View all
  • Chromatic Text Reveal

    Chromatic Text Reveal

    31
  • Schedule Builder

    Schedule Builder

  • Audit Log

    Audit Log

  • Secret Row

    Secret Row

  • Undoable Action

    Undoable Action

  • Audio Orb

    Audio Orb

  • AI Glow Border

    AI Glow Border

  • Metaballs

    Metaballs

More in Forms

View all
  • Form

    Form

    7
  • Login 2

    Login 2

    16
  • Contact Form

    Contact Form

    32
  • Book A Demo 1

    Book A Demo 1

    95
  • Contact Card

    Contact Card

    1.1K
  • Premium Auth

    Premium Auth

    613
  • Authentication Card

    Authentication Card

    52
  • Form

    Form

    18