You're in the Library

NumberField

Numeric input with decrease and increase buttons, arrow-key stepping, min and max, and locale-aware formatting.
Stable
Edit

Preview appears after the next Storybook update.

NumberField example
<NumberField />
Rendered with the real componentFrom the code
Light
Dark

When to use

Use it for

  • Exact numbers within known bounds: approvals, columns, spacing steps, retry counts.
  • suffix for the unit (px, ms, %), format for currency or percent.

Not for

  • Identifiers that only look like numbers (zip codes, ids, phone numbers): use Input with inputMode numeric.
  • Rough values where position matters: use Slider.

Do and don't

Every example is rendered with the real component, so it always matches what ships.

Do

Set min and max

Bounds disable the buttons at the edges and stop impossible values.

px
Don't

Unit in the label and in the value

Say it once, in the suffix: "Base spacing" with px, not "Base spacing (px)" plus px.

Accessibility

  • Base UI NumberField: a text input with role textbox and aria-roledescription Number field; Arrow Up and Down step, Shift uses largeStep.
  • The decrease and increase buttons are named and disabled at min and max.
  • Inherits label, description and error from Field; invalid sets aria-invalid and a danger edge.
  • Values use tabular figures so digits do not jump while stepping.

Content guidelines

  • Label names the quantity, the suffix names the unit.
  • Errors give the allowed range: "Use 1 to 5."

From the code Generated from the component, not editable here.

Anatomy and tokens

Read from packages/react/src/components/NumberField/NumberField.module.css at build time. Every value is a token: open one to see its alias chain in both themes.

26 tokens18 semantic or component, change with theme and brand4 density, change with comfortable or compact4 from the shared scales

Motion and interaction

NumberField animates on hover and press. Try it in the preview at the top.

WhenWhat changesDurationEasing
HoverBackground, border and text colormotion.duration.instant75 msmotion.easing.standardsettles in place
PressBackgroundmotion.duration.instant75 msmotion.easing.standardsettles in place

With reduced motion turned on, every change happens at once.

From the code Generated from the component, not editable here.

Props

Parsed from the TypeScript types in packages/react/src/components/NumberField/NumberField.tsx, so this table cannot drift from the code.

PropTypeDefaultDescription
labelstringnoneVisible label. When set, the NumberField wraps itself in a Field. Leave unset inside a Field.
hintReactNodenoneNo description in the code yet.
errorReactNodenoneNo description in the code yet.
valuenumber | nullnoneNo description in the code yet.
defaultValuenumbernoneNo description in the code yet.
onValueChange(value: number | null) => voidnoneNo description in the code yet.
minnumbernoneNo description in the code yet.
maxnumbernoneNo description in the code yet.
stepnumbernoneAmount for the buttons and arrow keys. Shift+arrow uses largeStep. Default 1.
largeStepnumbernoneNo description in the code yet.
formatIntl.NumberFormatOptionsnoneIntl number format, for example `{ style: 'unit', unit: 'pixel' }` or `{ maximumFractionDigits: 2 }`.
suffixReactNodenoneUnit or symbol shown after the value inside the box, for example "px".
hideSteppersbooleanfalseHide the increment and decrement buttons (keyboard and wheel still work).
size'sm' | 'md' | 'lg''md'No description in the code yet.
namestringnoneNo description in the code yet.
placeholderstringnoneNo description in the code yet.
disabledbooleannoneNo description in the code yet.
readOnlybooleannoneNo description in the code yet.
requiredbooleannoneNo description in the code yet.
hideLabelbooleannoneNo description in the code yet.
idstringnoneNo description in the code yet.
classNamestringnoneNo description in the code yet.

Playground

Change the props and see the real NumberField update. Controls are generated from the TypeScript props; nothing here changes the system.

Code for these props
<NumberField label="Required approvals" />

size

Workbench

For contributors: every state with the accessibility panel, in the component workbench (Storybook). The stories double as visual test fixtures; the guidance on this page is the user documentation (open NumberField in Storybook).

Embed Storybook stories here (4)

Loads from https://bridge-storybook.floriangouloubi.com (set STORYBOOK_URL at build time). If Storybook is not running, the frames stay empty.

Default

WithUnit

Invalid

AllStates

From the code Generated from the component, not editable here.

Changelog

  • Fix

    Component specs treat a button or a select (including the Base UI part that renders one, read from Base UI's docs) as border-box: NumberField steppers are their height token wide again

    v1.0.0, Nov 11, 2026

All release notes