0
Components
API reference

Number Field

Numeric input with increment/decrement steppers, horizontal label scrubbing, locale formatting, and Input variants.

Installation

Usage

Examples

With Scrub Area

Outline

Currency Formatting

With Field & Bounds

API Reference

NumberField

Wraps Base UI NumberField.Root and provides shared variant, shape, size, and fieldId context to child slots.

PropTypeDefaultDescription
valuenumber | null-Controlled numeric value
defaultValuenumber-Initial uncontrolled numeric value
onValueChange(value: number | null, eventDetails) => void-Callback fired when the numeric value changes
minnumber-Minimum allowed value
maxnumber-Maximum allowed value
stepnumber | "any"1Base increment/decrement step amount
smallStepnumber0.1Step amount when holding Alt
largeStepnumber10Step amount when holding Shift
formatIntl.NumberFormatOptions-Number formatting options (currency, percent, units, etc.)
variant"filled" | "outline" | "outlined""filled"Surface style passed to NumberFieldGroup
shape"pill" | "round" | "rounded" | "square""pill"Corner radius preset
size"sm" | "default" | "md" | "lg""default"Field height, padding, and stepper button size
disabledbooleanfalseDisables input, steppers, and scrub area

Subcomponents

  • NumberFieldGroup — styled container inheriting inputVariants (can override variant, shape, size).
  • NumberFieldInput — centered tabular-nums numeric input.
  • NumberFieldDecrement / NumberFieldIncrement — ghost icon stepper buttons.
  • NumberFieldScrubArea — interactive drag-to-scrub label (label: string) with horizontal resize cursor.

© taut ui — built with Base UI and Tailwind CSS v4.