Rxova
Skip to content

UseCurrencyInputOptions

Options for useCurrencyInput.

optional allowNegative?: boolean;

Allow negative amounts (refunds, adjustments).

false

CurrencyInputBaseOptions.allowNegative


optional country?: string;

Convenience: combined into ${language}-${country} when locale is absent.

CurrencyInputBaseOptions.country


currency: string;

ISO-4217 currency code, e.g. 'EUR', 'BGN', 'JPY'. Required.

CurrencyInputBaseOptions.currency


optional currencyDisplay?: CurrencyDisplay;

How the currency is displayed.

'symbol'

CurrencyInputBaseOptions.currencyDisplay


optional defaultValue?: number | null;

Uncontrolled initial amount. Ignored once value is provided.


optional formatMode?: FormatMode;

When the field formats. 'live' (default) formats as you type with a stable caret; 'blur' shows a plain number while focused.

'live'

CurrencyInputBaseOptions.formatMode


optional language?: string;

Convenience: combined into ${language}-${country} when locale is absent.

CurrencyInputBaseOptions.language


optional 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.

CurrencyInputBaseOptions.locale


optional maximumFractionDigits?: number;

Cap on fraction digits. Defaults to the currency’s own default (JPY → 0, EUR → 2, KWD → 3).

CurrencyInputBaseOptions.maximumFractionDigits


optional minimumFractionDigits?: number;

Floor on fraction digits in the formatted value.

0

CurrencyInputBaseOptions.minimumFractionDigits


optional numberingSystem?: string;

Override the numbering system, e.g. 'latn' to force ASCII digits.

CurrencyInputBaseOptions.numberingSystem


optional onValueChange?: (value, meta) => void;

Fires on every accepted keystroke with the parsed number (or null).

ParameterType
valuenumber | null
metaCurrencyInputChange

void


optional step?: number;

Amount added/subtracted by ArrowUp/ArrowDown. Omit to leave arrow keys untouched. The result is rounded to the currency’s fraction precision.

CurrencyInputBaseOptions.step


optional transformRawValue?: (raw) => string;

Transform browser input before locale-aware sanitization.

ParameterType
rawstring

string

CurrencyInputBaseOptions.transformRawValue


optional value?: number | null;

Controlled amount. null/undefined render an empty field, not "0".