azabroflovski

Pin Input

Forms 1

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

    8
  • Dialog

    Dialog

    5
  • Checkbox

    Checkbox

    4
  • Radio

    Radio

    2
  • Hotkey Button

    Hotkey Button

  • Card

    Card

  • Bar Chart

    Bar Chart

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