Ask Natuna

Ask about the design system

Hi, I am Natuna.

Ask me about the design system: components, tokens, statuses, and how to use them.

Natuna can be wrong. The docs are the source of truth.

Skip to content
  • IntroductionPage
  • Ask NatunaAsk about the design systemPage
  • FoundationColor, type, number, effectPage
  • Components overviewPage
  • ThemesLight and dark modePage
  • NamingProperty and page namesPage
  • Privacy statementPage
  • Text-safe stepsFirst AA and AAA step per color rampSection
  • AccessibilityWCAG 2.2 AAA rulesSection
  • Dark modeThemesSection
  • Using it todayFigma file and React codeSection
  • Component statusDesign status and In ReactSection

Arrow keys to move, Enter to open, Esc to close.

PIN Input

Masked boxes for entering a secret PIN.

Status
ReadyBuild day 19 of 21
Code
In React
Role
Form

Usage

This demo is live, and the code below it is the same code, imports included. The component lives in src/ui of this repository and is not published to npm yet.

Never share your PIN with anyone

Pastes as editable layers. Shadows are not exported.

import { useState } from "react";
import { PinInput } from "@/ui";

export default function PinDemo() {
  const [pin, setPin] = useState<string>("");

  return <PinInput label="Enter transaction PIN" value={pin} onChange={setPin} hint="Never share your PIN with anyone" />;
}

Variants and states

Every specimen is the real component from src/ui, held in one state.

4 digitempty, filled, error, disabled

Never share your PIN with anyone

Never share your PIN with anyone

Incorrect PIN. 2 attempts left.

Never share your PIN with anyone

6 digitempty, filled, error, disabled

Never share your PIN with anyone

Never share your PIN with anyone

Incorrect PIN. 2 attempts left.

Never share your PIN with anyone

Pastes as editable layers. Shadows are not exported.

Props

label
string · default none
Required.
length
4 | 6 · default 6
value, onChange
string, (value) => void · default none
A keypad outside the component can call onChange.
onComplete
(value) => void · default none
Called at full length.
hint, error
string · default none
showLabel
boolean · default true
disabled
boolean · default none

Figma to code

Figma properties by their exact names from Naming, and the React prop that carries each one. The table covers the shared properties that bear on this component; the Figma file decides which of them its component exposes. None means there is no prop for it yet.

🔀 Count
length
4 or 6 Digit.
🎯 State
value, error, disabled
Filled is the dot count.
Show Label, Label
showLabel, label
Same.
Show Helper Text, Helper Text
hint
Pass to show.

Accessibility

What the code in src/ui does today, and what it leaves to you.

Keyboard

  • A real password input sits over the dots, so the system keyboard works and Tab reaches it.

Screen readers

  • Named by the label. The value is never shown or read. The helper line is a polite live region, so an error is announced.

What you still need to do

  • The numeric keypad lives outside this component. Give its buttons names, and its delete button the name Delete.

When to use

Authorizing a transaction or unlocking an app.

Do and don't

Do

  • Mask each digit after it is entered.
  • Use a numeric keyboard on mobile.

Don't

  • Show the PIN in plain text by default.
  • Store or log the entered digits.

4 of 16 other atoms, same role and ready ones first.

See all components

Status reflects the component tracker snapshot of 29 October 2026.