sidiora-labs

Digit Input

Forms 4

About

A one-time-code / PIN input where typed digits animate up into place while the real input stays invisible on top for selection, paste and accessibility.

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

Code

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

Usage.tsx

import * as React from "react";

import { DigitInput } from "@/components/ui/digit-input";

export default function DigitInputDemo() {
  const [code, setCode] = React.useState("");
  return (
    <div className="grid justify-items-center gap-3">
      <DigitInput
        numeric
        maxLength={6}
        value={code}
        onValueChange={setCode}
        placeholder="000000"
        aria-label="Verification code"
      />
      <p className="text-[13px] text-muted-foreground tabular-nums">
        {code.length}/6 digits entered
      </p>
    </div>
  );
}

Dependencies

More by sidiora-labs

View all
  • Color List

    Color List

    25
  • Icon Accordion

    Icon Accordion

    25
  • Auth Drawer

    Auth Drawer

    24
  • Expandable Tabs

    Expandable Tabs

    21
  • Preview Rail

    Preview Rail

    19
  • Inline Slider

    Inline Slider

    14
  • Wave Slider

    Wave Slider

    14
  • Morph Confirm

    Morph Confirm

    14

More in Forms

View all
  • Form

    Form

    7
  • Login 2

    Login 2

    16
  • Contact Form

    Contact Form

    33
  • Contact Card

    Contact Card

    1.1K
  • Book A Demo 1

    Book A Demo 1

    95
  • Premium Auth

    Premium Auth

    614
  • Onboarding Stepper

    Onboarding Stepper

    13
  • Authentication Card

    Authentication Card

    52