MindeesUI
ComponentsForms

CurrencyInput

A numeric input that formats its value as localised currency on blur and edits raw digits on focus.

CurrencyInput accepts a numeric value in major units and renders it as a localised currency string via Intl.NumberFormat. While focused it shows a raw editable draft so the caret never fights group separators; on blur it reformats. Changes are reported through onChangeValue as a parsed number.

Import

import { CurrencyInput } from '@mindees/ui';

Usage

<CurrencyInput value={amount} onChangeValue={setAmount} currency="USD" locale="en-US" />

Props

PropTypeDefaultDescription
valuenumberNumeric value in major units (e.g. 12.5 for $12.50). NaN clears.
currencystring'USD'ISO 4217 currency code used for formatting.
localestringruntime defaultBCP 47 locale used for formatting.
onChangeValue(value: number) => voidFired with the parsed number; NaN when empty or unparseable.

Extends InputProps minus keyboardType, value, and onChangeText (all managed internally). size, leading, trailing, invalid, and disabled apply.

Accessibility

The field inherits Input's FormField wiring for accessibilityLabelledBy, aria-invalid, and aria-required. The numeric keyboard matches the expected input; supply an accessibilityLabel outside a FormField.

On this page