Forms

Pin Input

A field for entering a code or one-time password, one character per box. Typing moves to the next box.

ReactVueWeb Components
View in Storybook

Playground

Examples

<PinInput length={6} onComplete={verify} label="認証コード" />

Props

Name Type Default Description
length number 6 Number of cells. @default 6
value string Controlled value.
defaultValue string Initial value when uncontrolled. @default ''
onChange (value: string) => void Called with the current concatenated value on every change.
onComplete (value: string) => void Called once all cells are filled.
type 'numeric' | 'text' numeric Restrict input and set the mobile keyboard. @default 'numeric'
mask boolean false Obscure entered characters (one-time passcodes). @default false
size 'sm' | 'md' | 'lg' md Control size. @default 'md'
disabled boolean false Disable all cells. @default false
label string Digit Base accessible label for each cell, suffixed by position. @default 'Digit'
className string

Accessibility

  • Body/background contrast is ≥ 7:1 (AAA) in both light and dark.
  • Every interaction works with the keyboard alone.
  • The focus ring is always visible.
  • Respects prefers-reduced-motion and stops excessive motion.

Every component is designed to meet WCAG 2.1 AAA.