sidiora-labs

Digit Input

Forms 3

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
  • Icon Accordion

    Icon Accordion

    23
  • Expandable Tabs

    Expandable Tabs

    19
  • Auth Drawer

    Auth Drawer

    19
  • Color List

    Color List

    18
  • Preview Rail

    Preview Rail

    16
  • Swipeable List

    Swipeable List

    11
  • Tilt Card

    Tilt Card

    11
  • Wave Slider

    Wave Slider

    9

More in Forms

View all
  • Premium Auth

    Premium Auth

    593
  • Contact Form

    Contact Form

    28
  • Form

    Form

    4
  • Login 1

    Login 1

    70
  • Book A Demo 1

    Book A Demo 1

    94
  • Contact Card

    Contact Card

    1.1K
  • HeroUI Field Error

    HeroUI Field Error

    13
  • Form [react-aria-components]

    Form [react-aria-components]

    19