MoneyInput

An amount with its currency.

<MoneyInput
	value={amount}
	onValueChange={setAmount}
	currency="EUR"
	currencyLabel="Currency"
/>

With no onCurrencyChange the trailing select is locked, for the common case of an app that settles in one currency. The amount field stays fully legible either way — a disabled currency must not grey out the number next to it.

API

PropTypeDefault
currencystringrequiredSelected currency code (e.g. "EUR").
currencyLabelstringrequiredAccessible name for the currency select.
onValueChange(value: string) => voidrequiredReceives the raw amount string on every change.
valuestringrequiredRaw amount as typed (e.g. "120" or "120.50").
actionReactNodeA control set inside the box before the currency, typically an InputGroup.Button that fills the amount ("Max").
classNamestringWrapper class (width/layout), forwarded to the InputGroup.
currenciesreadonly string[][currency]Currency codes offered by the select. Defaults to the single currency.
currencyDisabledbooleancurrencies.length <= 1Locks the currency select. Defaults to true when there is a single currency to choose from, so the platform's single-currency case reads as a disabled selector rather than a bare suffix.
onCurrencyChange((currency: string) => void)Receives the selected currency code. Omit when the select is locked.
defaultValuestring | number | readonly string[]The default value of the input. Use when uncontrolled.
renderComponentRenderFn<HTMLProps, InputState> | ReactElement<unknown, string | JSXElementConstructor<any>>Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleCSSProperties | ((state: InputState) => CSSProperties | undefined)Style applied to the element, or a function that returns a style object based on the component's state.

Plus the DOM props of the element it renders. Source: money-input/components/money-input.tsx.