On this page:

PIN Field

Preview

index.tsx

Groups

Preview

index.tsx
-
-

Masked

Preview

index.tsx

Sizes

Preview

index.tsx

Small Size:

Medium Size:

States

Preview

index.tsx

Default:

Invalid:

Disabled:

Read Only:

Reset Button:

Custom

Preview

index.tsx

Custom Separator:

-
-

Custom Placeholder:

*
*
*
*

Alternative

Preview

index.tsx

Groups

Preview

index.tsx
-
-

Masked

Preview

index.tsx

Sizes

Preview

index.tsx

Small Size:

Medium Size:

States

Preview

index.tsx

Default:

Invalid:

Disabled:

Read Only:

Reset Button:

Custom

Preview

index.tsx

Custom Separator:

-
-

Custom Placeholder:

*
*
*
*

Design Tokens for PinField

Note: PinField uses the same design tokens as Input. See Input documentation for more details.


PinField API Reference

<PinField />

PropTypeDefaultDescription
groupsnumber[][4]Number and grouping of PIN fields (e.g. [2,2,2])
valuestringPIN value (controlled)
onChangefunction (value)Callback when value changes
onCompletefunction (value)Callback when all fields are filled
maskedbooleanfalseMask input characters (password style)
separatorstring'-'Separator character between groups
resetbooleanfalseReset all input fields
readOnlybooleanfalseRead-only, cannot edit
disabledbooleanfalseDisable all fields
invalidbooleanfalseInvalid/error state
size'sm' | 'md''md'Field size
theme'default' | 'alternative''default'Theme
placeholderstring'•'Placeholder for empty fields
...HTMLDivPropsHTMLDivElement propsInherits all props of div

Note: PinField does not inherit InputProps directly but HTMLDivElement props.