Skip to content

Currency Input

Free

A field for an amount of money in one currency. It puts the symbol where the locale puts it, groups thousands, and keeps the cents of the currency.

  • React 19
  • Tailwind CSS 4

Added Nov 9, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

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>
PropTypeDefaultDescription
classNamestring—
rounded"default""full""default"
size"default""lg""sm""xs""default"
variant"dashed""default"—
disabledbooleanfalseTurns the control off; the frame fades to 50% with it (the Base UI name).
readOnlybooleanfalseThe amount shows and can be copied, but not changed (the Base UI name).
currencyRequiredstring—The ISO 4217 code: "USD", "EUR", "JPY". It sets the symbol and the fraction digits.
localestring—The locale of the separators and the symbol side. Default: the display locale (en-US unless a provider sets one).
minnumber—The smallest amount; valid is false below it (a lower amount can still be typed).
maxnumber—The largest amount. The mask stops a larger one as you type, so it never shows.
valuestring—The shown amount (controlled). "1250" shows "1,250".
defaultValuestring""The first shown amount (uncontrolled).
onValueChange—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>
PropTypeDefaultDescription
classNamestring—
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

CurrencyInputCode

<div>
PropTypeDefaultDescription
classNamestring—
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

CurrencyInputControl

<div>
PropTypeDefaultDescription
classNamestring—
guideboolean—The ghost guide of the slots still to fill, while the input has focus. Default true.
rawNamestring—Also submit the raw value under this name (a hidden input), next to the shown one.
rejectFeedbackboolean—Nudge the field 2px when the mask rejects a key. Default true.
onReject—Runs when the mask rejects a key (a letter in a number, a 13th month).
refRef<HTMLInputElement>—
rounded"default""full"—
size"default""lg""sm""xs"—
...props<div> attributes—Every other attribute goes to the <div>.
  • Use it for an amount, a price, or a budget.
  • Use min and max for the range. The mask stops an amount over max.
  • Use locale for the separators and the symbol side of another country.

It is a native input with a decimal keypad, in a Field for the label and the error.

The symbol is visible text next to the input, so it is read with the field.

Rejected key
indicator · the frame moves 2px to each side and back when the mask rejects a key

Built with

Installs with Currency Input

  1. AddedCurrency Input, with Input Group, Masked Input.
Open the release