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);
});
};
The content for the prompt on the pin pad.
Whether the entered PIN should be masked.
The maximum length of the PIN.
The minimum length of the PIN.
The function to be called when a PIN is entered.
The function to be called when the PIN is submitted.
The call to action between the entry view and the keypad, consisting of a label and function that returns the pin.
4 | 5 | 6 | 7 | 8 | 9 | 10
'accept' | 'reject'
The label for the action button.
The function to be called when the action button is pressed.