UseCurrencyInputResult
Return value of useCurrencyInput.
Properties
Section titled “Properties”currencySymbol
Section titled “currencySymbol”currencySymbol: string;The resolved currency symbol/code/name for the chosen currencyDisplay.
decimalSeparator
Section titled “decimalSeparator”decimalSeparator: string;The locale’s decimal separator (e.g. ',' in de-DE).
display
Section titled “display”display: string;The string the input is currently displaying.
focused
Section titled “focused”focused: boolean;true while the field is focused (showing the editable number).
format
Section titled “format”format: (value) => string;Format a number the way this field would.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value | number | null |
Returns
Section titled “Returns”string
groupSeparator
Section titled “groupSeparator”groupSeparator: string;The locale’s group separator (may be a non-breaking space, or '').
inputProps
Section titled “inputProps”inputProps: CurrencyInputElementProps;Spread these onto an <input>; the hook owns its value and events.
parse: (input) => number | null;Parse a string the way this field would.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input | string |
Returns
Section titled “Returns”number | null
ref: object;Attach to the underlying <input>. Required in 'live' mode so the hook
can keep the caret in place while it reformats; harmless otherwise.
Typed as a plain writable ref object rather than RefObject/MutableRefObject
so it works across React 18 and 19: React 18’s RefObject.current is
readonly (breaks the internal bridge assignment) and React 19 deprecates
MutableRefObject. A bare { current } is writable and current on both.
current
Section titled “current”current: HTMLInputElement | null;setValue
Section titled “setValue”setValue: (value) => void;Imperatively set the value — e.g. on a form reset.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value | number | null |
Returns
Section titled “Returns”void
value: number | null;The current parsed value.