InputNumber

Numeric input that only accepts numbers. Optionally formats as currency with thousand separators while typing. onChange returns both the parsed number and the display text.

Playground
currency
controls
prefix
suffix
placeholder
size
disabled
<InputNumber/>

onChange: value & text

onChange fires on every keystroke and returns (value: number | null, text: string).

value: null text: “”

Currency format

currency adds thousand separators as you type. Use thousandSeparator and decimalSeparator to localise.

Spinner controls

controls shows ▲ ▼ buttons. Arrow keys also increment/decrement.

Prefix & Suffix

String symbols shown inside the wrapper. Purely visual, not part of the value.

Min / Max / Precision

min and max are enforced on blur and spinner. precision limits decimal places.

Allowed: 0 – 100

Sizes

Three sizes that match the rest of the component library.

Label, Error & Hint

Same label/error/hint pattern as the Input component.

Enter the transaction amount
Amount must be greater than 0

Disabled

Disabled state prevents all interaction including spinner buttons and keyboard shortcuts.

API

PropertyTypeDefaultDescription
valuenumberControlled numeric value
defaultValuenumberUncontrolled initial numeric value
onChange(value: number | null, text: string) => voidFires on every change. Receives the parsed number and the formatted display text
minnumberMinimum allowed value, enforced on blur and spinner
maxnumberMaximum allowed value, enforced on blur and spinner
stepnumber1Spinner increment/decrement step
precisionnumberMax decimal places. Omit for unlimited. Pass 0 for integers only
currencybooleanfalseFormat with thousand separators while typing
thousandSeparatorstring","Thousand separator character
decimalSeparatorstring"."Decimal separator character
prefixstringSymbol/text shown before the value (e.g. "₫" or "$")
suffixstringSymbol/text shown after the value (e.g. "VND")
controlsbooleanfalseShow ▲ ▼ spinner buttons
labelstringLabel text above the input
requiredbooleanfalseAdds a red asterisk to the label
errorstringError message shown below the input
hintstringHelper text shown below the input
size"sm" | "md" | "lg""md"Size preset
disabledbooleanfalseDisable all interaction
placeholderstringPlaceholder text
rounded"none" | "sm" | "md" | "lg" | "full"Border-radius override