Skip to main content

Keypad

Enter a PIN or an amount on raised digit keys, or type it on the keyboard.

View as Markdown

Installation

Component API

PropTypeDefaultDescription
valuestring-
defaultValuestring-The typed digits on first render, uncontrolled.
The typed digits on first render, uncontrolled.
onValueChange(value: string) => void-Called with the digits whenever they change.
Called with the digits whenever they change.
lengthnumber4How many digits a PIN takes.
How many digits a PIN takes.
onComplete(value: string) => void-Called once a PIN reaches length.
Called once a PIN reaches length.
currencystringUSDThe currency an amount is in, as an ISO code.
The currency an amount is in, as an ISO code.
localestringen-USFormats the amount's grouping, decimal mark and currency sign.
Formats the amount's grouping, decimal mark and currency sign.
labelstring-The line over the display, and the keypad's accessible name.
The line over the display, and the keypad's accessible name.
variantpin | amountamountA PIN of a fixed length, shown as dots, or an amount with its currency.
A PIN of a fixed length, shown as dots, or an amount with its currency.
shapenone | rounded | pill-
classNamestring-
focusboolean | stringtrue