UseCurrencyInputOptions
Options for useCurrencyInput.
Extends
Section titled “Extends”Properties
Section titled “Properties”allowNegative?
Section titled “allowNegative?”allowNegative?: boolean;Allow negative amounts (refunds, adjustments).
Default
Section titled “Default”falseInherited from
Section titled “Inherited from”CurrencyInputBaseOptions.allowNegative
country?
Section titled “country?”country?: string;Convenience: combined into ${language}-${country} when locale is absent.
Inherited from
Section titled “Inherited from”CurrencyInputBaseOptions.country
currency
Section titled “currency”currency: string;ISO-4217 currency code, e.g. 'EUR', 'BGN', 'JPY'. Required.
Inherited from
Section titled “Inherited from”CurrencyInputBaseOptions.currency
currencyDisplay?
Section titled “currencyDisplay?”currencyDisplay?: CurrencyDisplay;How the currency is displayed.
Default
Section titled “Default”'symbol'Inherited from
Section titled “Inherited from”CurrencyInputBaseOptions.currencyDisplay
defaultValue?
Section titled “defaultValue?”defaultValue?: number | null;Uncontrolled initial amount. Ignored once value is provided.
formatMode?
Section titled “formatMode?”formatMode?: FormatMode;When the field formats. 'live' (default) formats as you type with a
stable caret; 'blur' shows a plain number while focused.
Default
Section titled “Default”'live'Inherited from
Section titled “Inherited from”CurrencyInputBaseOptions.formatMode
language?
Section titled “language?”language?: string;Convenience: combined into ${language}-${country} when locale is absent.
Inherited from
Section titled “Inherited from”CurrencyInputBaseOptions.language
locale?
Section titled “locale?”locale?: string;BCP-47 locale, e.g. 'bg-BG'. Takes precedence over language/country.
When all three are omitted the runtime default locale is used.
Inherited from
Section titled “Inherited from”CurrencyInputBaseOptions.locale
maximumFractionDigits?
Section titled “maximumFractionDigits?”maximumFractionDigits?: number;Cap on fraction digits. Defaults to the currency’s own default (JPY → 0, EUR → 2, KWD → 3).
Inherited from
Section titled “Inherited from”CurrencyInputBaseOptions.maximumFractionDigits
minimumFractionDigits?
Section titled “minimumFractionDigits?”minimumFractionDigits?: number;Floor on fraction digits in the formatted value.
Default
Section titled “Default”0Inherited from
Section titled “Inherited from”CurrencyInputBaseOptions.minimumFractionDigits
numberingSystem?
Section titled “numberingSystem?”numberingSystem?: string;Override the numbering system, e.g. 'latn' to force ASCII digits.
Inherited from
Section titled “Inherited from”CurrencyInputBaseOptions.numberingSystem
onChange?
Section titled “onChange?”onChange?: CurrencyValueChangeHandler;Fires on every accepted keystroke with the parsed number (or null).
onValueChange?
Section titled “onValueChange?”onValueChange?: CurrencyValueChangeHandler;The same handler as onChange.
step?: number;Amount added/subtracted by ArrowUp/ArrowDown. Omit to leave arrow keys untouched. The result is rounded to the currency’s fraction precision.
Inherited from
Section titled “Inherited from”transformRawValue?
Section titled “transformRawValue?”transformRawValue?: (raw) => string;Transform browser input before locale-aware sanitization.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
raw | string |
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”CurrencyInputBaseOptions.transformRawValue
value?
Section titled “value?”value?: number | null;Controlled amount. null/undefined render an empty field, not "0".