Currency input
Money input with a currency select, as-you-type grouping, Intl locale formatting, minor-unit precision, paste normalisation and min/max validation.
Preview
Send a transfer
Between 10 and 25,000. Paste amounts in any format.
- Minor units
- 125000
- Currency
- USD
Other locales
Must be at least $5.00
Install
Pro source requires Pebble Pro. Try the full preview above.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | — | Visible label. |
| value | number | null | — | Controlled amount in major units; null is empty. |
| defaultValue | number | null | null | Initial amount when uncontrolled. |
| onValueChange | (value: number | null, minor: number | null) => void | — | Called with major and minor units (cents). |
| currency | string | — | Controlled ISO 4217 code. |
| defaultCurrency | string | "USD" | Initial currency when uncontrolled. |
| onCurrencyChange | (currency: string) => void | — | Called when the select changes. |
| currencies | string[] | — | Codes offered in the currency select; omit to hide it. |
| locale | string | "en-US" | Grouping, decimal mark and symbol position. |
| min | number | — | Lowest valid amount (checked after blur). |
| max | number | — | Highest valid amount (checked after blur). |
| description | ReactNode | — | Help text under the field. |
| error | ReactNode | — | Error text; overrides the built-in min/max message. |
| name | string | — | Form name; a hidden input carries the fixed-decimal amount. |
Pro component
Try the full preview above. Editable source and build guides require Pebble Pro.
