azabroflovski

Pin Input

Forms

About

A multi-cell input for typing a short confirmation code or PIN one character per cell, with numeric or text mode, grouping, masking, paste-fill and arrow/backspace navigation.

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

Code

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

Usage.tsx

"use client";

import * as React from "react";
import PinInput from "@/components/ui/pin-input";

export default function PinInputDemo() {
  const [code, setCode] = React.useState("");

  return (
    <div className="flex items-center gap-3 rounded-lg bg-[#0b0b0f] p-8">
      <PinInput
        value={code}
        onValueChange={setCode}
        aria-label="Confirmation code"
      />
      <span style={{ minWidth: 90, fontSize: 13, color: "var(--o-text-3)" }}>
        {code || "nothing yet"}
      </span>
    </div>
  );
}

More by azabroflovski

View all
  • Switch

    Switch

    11
  • Select

    Select

    7
  • Dialog

    Dialog

    5
  • Checkbox

    Checkbox

    4
  • Hotkey Button

    Hotkey Button

  • Radio

    Radio

  • Card

    Card

  • Bar Chart

    Bar Chart

More in Forms

View all
  • Premium Auth

    Premium Auth

    577
  • Login 1

    Login 1

    68
  • Contact Card

    Contact Card

    1.1K
  • Form

    Form

    18
  • Login Card

    Login Card

    36
  • Login 2

    Login 2

    15
  • Change Password Form

    Change Password Form

    11
  • Form

    Form

    3