TrademarkTrademark
Docs
Ctrl k
Search docs...
Form Controls

NumberInput

Updated: October 18, 2026
View on GitHub
Soon
Not released yet. This is on main and is not in any published version yet. It will not install today.

NumberInput is an Input for a number. The − and + buttons step the value by step and stop at min and max. Typing works too, and onChange gets a number whenever the text reads as one. The keyboard is a number pad, with a minus key when min allows negative numbers. See the web NumberInput for the browser version.

Basic usage

Without value the field keeps its own text, starting from defaultValue.

Controlled

Pass value and update it in onChange. A new value from outside replaces the text, unless the text already reads as that number, so typing 1. is not undone.

Decimals and padding

A fractional step rounds each step to its decimals, so 0.1 + 0.2 shows as 0.3. padStart pads the number with leading zeros.

Differences from the web

  • The steppers are a − and a + button after the value, sized for a finger, instead of two small chevrons stacked on the right edge.
  • A stepper is disabled when its next step would pass min or max. On the web it stays enabled and does nothing.
  • Steps are rounded to the decimals of step, so fractional steps do not show floating-point noise.
  • keyboardType defaults to a number pad: decimal-pad when min is 0 or more, otherwise a keyboard with a minus key. Pass keyboardType to change it.
  • suffix is taken by the steppers, as on the web. The other Input props work as on Input.

API reference

Prop
Type
Default
Description
valuenumberThe number, when the host owns the state. Pair with onChange.
defaultValuenumber | stringThe starting number when there is no value. A string is parsed.
onChange(value: number) => voidCalled with the number, whenever the text reads as one.
minnumberThe lowest value the − button reaches.
maxnumberThe highest value the + button reaches.
stepnumber1How far each button press moves the value.
padStartnumberPads the shown number with leading zeros to this many digits.
...InputPropsInputPropsEvery other Input prop except suffix: label, error, description, size and the rest.
Edit this page on GitHub
TrademarkTrademark
Built with curiosity by Lorant One and the Design Engineers Club