Render one key for each name of the layout, and apply each key to your own text with applyNumberPadKey.
amount-pad.tsx
NumberPad
<fieldset>| Prop | Type | Default | Description |
|---|---|---|---|
| disabled | boolean | false | Turn the whole pad off (a swap in flight). |
| size | "default""sm" | "default" | |
| on | — | Called with each key: a digit, decimal, delete, or clear (a held delete, or the Delete key). The pad owns no value: apply the key to your own value (applyNumberPadKey). | |
| locale | string | — | The locale of the decimal key: . in en-US, , in de-DE. Default "en-US". |
| decimal | boolean | true | Show the decimal key. false for a PIN or whole units: its place stays empty. Default true. |
| disabled | Iterable<NumberPadKeyName> | — | Keys that do nothing now (blockedNumberPadKeys): no decimals left, nothing to delete. |
| children | ReactNode | — | The keys. Default: the 12 keys of a phone pad. |
| ...props | <fieldset> attributes | — | Every other attribute goes to the <fieldset>, with a ref. |
NumberPadKey
<button>| Arrow keys | Move between keys; keys that are off are skipped. |
|---|---|
| 0-9orperiodorcomma | Press the digit or the decimal key. |
| Backspace | Press delete. |
| Delete | Press clear. |











