Skip to content
LyEve UI v0.60.1

Form controls

NumberInput

A numeric input with discrete increment / decrement controls. Step, min, and max are honored both in the +/− buttons and in the underlying native input.

Basic

Under a touch screen each stepper takes a 44px target while it draws narrower than under a mouse, so a field as narrow as w-32 keeps room for its value. Each target meets the number and grows outward from it, in either text direction, so a tap just inside the field never steps the value. A mouse sees no change.

Focused from the keyboard, the field turns its border the focus color, with no ring inside or around it, as Input does.

Custom step

Error state

Pick a value greater than 0.

API

PropTypeDefaultDescription
value number0Bindable numeric value.
min number no defaultLower bound (inclusive).
max number no defaultUpper bound (inclusive).
step number1Increment used by the +/− buttons.
disabled booleanfalseDisable the entire control.
required booleanfalseRequires a value. The label carries a mark that says so.
label string no defaultLabel rendered above the control.
hint string no defaultHelper text below the control. An error replaces it.
error string no defaultError message. Reddens the input border.
id string no defaultDOM id of the underlying input.
name string no defaultNative form name.
onchange (value: number) => void no defaultFires on +/−, on input, and on programmatic change.
class string no defaultExtra classes on the wrapper.
noAI booleanfalseKeep the value from an assistant: a FormAssist never reports it or fills it, and the control is marked data-no-ai for a browser agent.