Put the symbol, the control, and the code in the input, inside a Field with a label and a description.
The sample also uses Field. One command adds them with this item:
monthly-budget.tsx
CurrencyInput
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| class | string | — | |
| rounded | "default""full" | "default" | |
| size | "default""lg""sm""xs" | "default" | |
| variant | "dashed""default" | — | |
| disabled | boolean | false | Turns the control off; the frame fades to 50% with it (the Base UI name). |
| read | boolean | false | The amount shows and can be copied, but not changed (the Base UI name). |
| currency | string | — | The ISO 4217 code: "USD", "EUR", "JPY". It sets the symbol and the fraction digits. |
| locale | string | — | The locale of the separators and the symbol side. Default: the display locale (en-US unless a provider sets one). |
| min | number | — | The smallest amount; valid is false below it (a lower amount can still be typed). |
| max | number | — | The largest amount. The mask stops a larger one as you type, so it never shows. |
| value | string | — | The shown amount (controlled). "1250" shows "1,250". |
| default | string | "" | The first shown amount (uncontrolled). |
| on | — | Runs on every change with the text, the number (details.unmasked), and the checks. | |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
CurrencyInputSymbol
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| class | string | — | |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
CurrencyInputCode
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| class | string | — | |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
CurrencyInputControl
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| class | string | — | |
| guide | boolean | — | The ghost guide of the slots still to fill, while the input has focus. Default true. |
| raw | string | — | Also submit the raw value under this name (a hidden input), next to the shown one. |
| reject | boolean | — | Nudge the field 2px when the mask rejects a key. Default true. |
| on | — | Runs when the mask rejects a key (a letter in a number, a 13th month). | |
| ref | Ref<HTMLInputElement> | — | |
| rounded | "default""full" | — | |
| size | "default""lg""sm""xs" | — | |
| ...props | <div> attributes | — | Every other attribute goes to the <div>. |
Built with
Installs with Currency Input
- Components
- Input Group,Masked Input







