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>
);
}















