Decimal Input

A number field with locale-aware formatting. Type freely, see the formatted value on blur. Specialized variants ship for currency, percentage, and unit values.

Currency

CurrencyInput applies the right symbol, separator, and decimal places per ISO currency code. Eleven currencies are pre-configured: USD, EUR, GBP, JPY, CNY, KRW, INR, BRL, CAD, AUD, CHF.

$
¥

Percentage

%

Unit

kg

Installation

Props

PropTypeDefaultDescription
value
numberControlled numeric value.
onChange
(value: number) => voidEmits a JS number, even though the field formats with separators.
decimals
number2Number of decimal places kept and displayed on blur.
min / max
numberClamp range. Out-of-range values are clamped on blur.
thousandsSeparator
string","Inserted between every three integer digits on blur.
decimalSeparator
string"."Used between integer and fractional parts.
prefix
stringStatic text rendered before the value (e.g. "$").
suffix
stringStatic text rendered after the value (e.g. " kg").
allowNegative
booleantrueAllow leading minus.