Skip to content

Number Field

Free

A field for one number, with minus and plus buttons. Arrow keys step it, a drag on the label changes it, and it formats the number for the locale.

  • Base UI
  • React 19
  • Tailwind CSS 4

Added Nov 8, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Compose the group.

quantity-field.tsx

NumberField

<div>
PropTypeDefaultDescription
classNamestring—
From Base UINumberField.RootBase UI docs
idstring—The id of the input element.
minnumber—The minimum value of the input element.
maxnumber—The maximum value of the input element.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

NumberFieldScrubArea

<span>
PropTypeDefaultDescription
classNamestring—
From Base UINumberField.ScrubAreaBase UI docs
direction"horizontal""vertical""horizontal"Cursor movement direction in the scrub area.
pixelSensitivitynumber2Determines how many pixels the cursor must move before the value changes. A higher value will make scrubbing less sensitive.
teleportDistancenumber—If specified, determines the distance that the cursor may move from the center of the scrub area before it will loop back around.
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

NumberFieldScrubAreaCursor

<div>
PropTypeDefaultDescription
classNamestring—
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

NumberFieldGroup

<div>
PropTypeDefaultDescription
size"default""lg""sm""xs""default"
classNamestring—
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

NumberFieldInput

<input>
PropTypeDefaultDescription
classNamestring—
From Base UINumberField.InputBase UI docs
aria-roledescriptionstring'Number field'A user-friendly description of the input's role for assistive tech. This is a role description, not an accessible name — use Field.Label or aria-label to name the control.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
style—Style applied to the element, or a function that returns a style object based on the component's state.
...props<input> attributes—Every other attribute goes to the <input>, with a ref.

NumberFieldDecrement

<div>
PropTypeDefaultDescription
classNamestring—
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

NumberFieldIncrement

<div>
PropTypeDefaultDescription
classNamestring—
...props<div> attributes—Every other attribute goes to the <div>, with a ref.
  • Set min, max, and step.
  • Pass format for a currency, a percent, or a unit.
  • Add NumberFieldScrubArea for a drag on the label.
  • For a number that is a position in a range, use a Slider.
  • For a code or a phone number, use a plain field: they are not numbers.
Up ArroworDown ArrowSteps by step. Shift steps by largeStep, and Alt by smallStep.
Page UporPage DownSteps by largeStep.
HomeorEndGoes to min or max.

The input is a spinbutton for the keyboard and screen readers.

Each stepper keeps a 44px touch target. To the eye it stays small.

Built with

Installs with Number Field

Components
Input Group
  1. AddedNumber Field, with Input Group.
Open the release