MindeesUI
ComponentsForms

PINInput

A masked segmented code field for PINs, built on OTPInput with secure entry always on.

PINInput is OTPInput with secureTextEntry forced on and a default length of 4. Each entered digit renders as a dot, making it suited to short numeric secrets.

Import

import { PINInput } from '@mindees/ui';

Usage

<PINInput length={4} value={pin} onChangeText={setPin} onComplete={unlock} />

Props

PropTypeDefaultDescription
lengthnumber4Number of code boxes.
valuestringControlled value (the full PIN so far).
onChangeText(code: string) => voidCalled whenever the PIN changes.
onComplete(code: string) => voidCalled once when the PIN reaches length.
disabledbooleanfalseDisable input and dim the boxes.
autoFocusbooleanfalseFocus the hidden input on mount.
accessibilityLabelstringAccessible label for the whole code field.

PINInputProps is OTPInputProps without secureTextEntry (it is always on).

Accessibility

The field is a single focus target labelled PIN code by default. Entered digits are masked visually but remain in the input's value for autofill and validation.

On this page