A component used to authenticate or identify individuals through a standarized number pad.
const onPinSubmit = (pin: number[]): Promise<PinValidationResult> => {
return new Promise((resolve) => {
setTimeout(() => {
const isPinValid =
pin.length === 6 && pin.every((digit, index) => digit === index + 1);
const result: PinValidationResult = isPinValid ? 'accept' : 'reject';
resolve(result);
}, 1000);
});
};
Whether the entered PIN should be masked.
The minimum length of the PIN.
The maximum length of the PIN.
The content for the prompt on the pin pad.
The call to action between the entry view and the keypad, consisting of a label and function that returns the pin.
The function to be called when the PIN is submitted.
The function to be called when a PIN is entered.
4 | 5 | 6 | 7 | 8 | 9 | 10
The label for the action button.
The function to be called when the action button is pressed.
'accept' | 'reject'