Skip to Content
Forms & Inputs@hacline/ui/number-input

NumberInput

Enter numeric values and adjust them by step increments.

Usage

Omit children for a ready-to-use numeric stepper with built-in increment/decrement controls and keyboard arrow support. On commit, the value is clamped and formatted according to min, max, and step.

Reserve between 1 and 20 seats.

Currency Formatting & Stacked Stepper

Format amounts with Intl.NumberFormatOptions, set step={0.01} for decimal precision, and switch to controls="stacked" for a compact trailing stepper suited to forms.

Layouts, Variants & Addons

Configure controls ("sides", "stacked", or "none"), variant ("default" or "filled"), size ("sm", "md", "lg"), and inline prefix / suffix units.

px
%
:

Parts

Pass custom children to compose lower-level parts directly.

PartDescriptionExtended Props
NumberInputControl
The text field, which shows the formatted number and takes typing.—
NumberInputDecrement
Steps down once, then repeats while held. Shift steps by largeStep.—
NumberInputGroup
Holds the input and its buttons.
variantsize
NumberInputIncrement
Steps up once, then repeats while held. Shift steps by largeStep.—
NumberInputScrubArea
Drag across it to change the value. It works anywhere inside the number input, and outside it through controller, like an icon in a toolbar.—
NumberInputScrubAreaCursor
Stands in for the mouse cursor while a scrub locks the pointer. Rendered in the body, so transformed ancestors can't move it.—

Props

Prop

Type

View parts and state attributes in UI SDK.