"use client";
import { PinInput } from "@pixxl-tools/components";| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | Current value (controlled); null where it means "nothing selected". |
autoComplete | string | "one-time-code" | autocomplete of the first field (default "one-time-code", for SMS code autofill). |
defaultValue | string | — | Initial value when uncontrolled. |
disabled | boolean | — | Disables interaction. |
inputLabel | (index: number) => string | — | — |
length | number | — | — |
onComplete | (value: string) => void | — | Every field is filled. |
onValueChange | (value: string) => void | — | Called with the new value (only when it changes). |
type | "numeric" | "alphanumeric" | — | Accepted characters: digits (default, numeric keyboard) or letters and digits. |
valuestring
Current value (controlled); null where it means "nothing selected".
autoCompletedefault "one-time-code"string
autocomplete of the first field (default "one-time-code", for SMS code autofill).
defaultValuestring
Initial value when uncontrolled.
disabledboolean
Disables interaction.
inputLabel(index: number) => string
lengthnumber
onComplete(value: string) => void
Every field is filled.
onValueChange(value: string) => void
Called with the new value (only when it changes).
type"numeric" | "alphanumeric"
Accepted characters: digits (default, numeric keyboard) or letters and digits.
Other props are passed to the root element (HTMLAttributes<HTMLDivElement>), including className, style, id and aria-* attributes.
const pin = "1234";
<PinInput value={pin} />