NumberField
A number input with step arrows and a scrub area.
Basic
Group shows the input and the step arrows. Put Field.Label in ScrubArea to make the label draggable.
Drag the label left or right to change the value.
Sizes
Match the size of the buttons beside the field, and use lg only for a hero field. sm, md, and lg are 26, 36, and 44 pixels high.
sm · dense UImd · defaultlg · hero field
States
Use inset by default and line for light or inline editing, with one appearance per form. Set invalid or disabled on Field.Root for the other states.
inset · forms
Enter 100 or less.
line · inline editing
Enter 100 or less.
Usage
These are defaults, not laws. Break one when you have a good reason, or when it makes the design more cohesive or more interesting.
- Label the field with
Field.LabelinsideField.Root. Put the label inNumberField.ScrubAreato let users drag it to change the value. - For a value inside a range, where position matters more than the exact number, use Slider.
API
Props that the library adds. Every part also takes all the Base UI props.
NumberField.Group
| Prop | Type | Default | Description |
|---|---|---|---|
| size | 'sm' | 'md' | 'lg' | 'md' | Sets the text size, padding, and control height. |
| appearance | 'inset' | 'line' | 'inset' | Sets the field shape. Line shows only a bottom line and no divider before the steppers. |
| children | ReactNode | <Input /><Steppers /> | The content of the field. The default is the input and a spin box. |
NumberField.Steppers
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | – | Classes for the column that holds Increment and Decrement. This part is not in Base UI. |
NumberField.ScrubAreaCursor
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | – | The cursor that shows while the user drags. The default is a left and right arrow. |





