Skip to content
Mizen UI
Docs

IntroductionInstallationCLIStylingFoundationsThemingCompositionIntegrationsAccessibilityFor agents

useCopyToClipboard

AccordionAspect RatioCardCollapsibleFrameGridGroupInlineScroll AreaSectionSeparatorSpacerStack

BlockquoteCitationCodeHeadingKbdLabelLinkTextVisually Hidden

ButtonButton GroupToggleToggle groupToolbar

CalendarCheckboxCheckbox groupComboboxDate pickerDate range pickerDate-Time InputFieldFieldsetFile UploadFormInputInput groupNumber fieldOTP FieldRadio groupSelectSliderSwitchTextareaTime Input

BreadcrumbMenubarNavigation MenuPaginationSegmented ControlStepperTabs

Alert dialogCommandContext MenuDialogDrawerMenuPopoverPreview CardSheetTooltip

AlertBadgeEmptyError StateMeterProgressSkeletonSpinnerStatus dotToast

Activity FeedAvatarAvatar GroupData TableListMetricOverflow ListProperty ListTableTokenTree

Area ChartBar ListCalendar HeatmapCategory ComparisonChart FrameChart LegendChart TooltipDistributionFunnelHeatmapMetric TrendPart-to-WholeProgress RingsRadar ChartRadial BarsSankey ChartScatter ChartScore GaugeTime Series

Diagram

AttachmentCarouselCode BlockLightboxMarkdownThumbnailTimestamp

Agent ThinkingApproval CardComposerConversationInline CitationMessageMessage ScrollerQuestion CardSourcesStreaming TextSuggestionTask ListTerminalTool Call

On this page

  • Preview
  • Usage
  • Anatomy
  • Examples
  • Purchase details
  • Canvas spacing
  • Control sizes
  • Limits and validation
  • Recommendations
  • Usage boundaries
  • API reference

Forms

Number field

Captures and formats numeric input with stepping, bounds, and scrub interactions.

idle

Usage

import {
	NumberField,
	NumberFieldDecrement,
	NumberFieldGroup,
	NumberFieldIncrement,
	NumberFieldInput,
} from "@mizen-labs/ui";

Anatomy

The parts and how they nest, taken from the preview above.

<NumberField>
	<NumberFieldGroup>
		<NumberFieldDecrement />
		<NumberFieldInput />
		<NumberFieldIncrement />
	</NumberFieldGroup>
</NumberField>

Examples

Purchase details

Adjust the transaction amount and quantity.

Canvas spacing

Drag a label to adjust its numeric value.

Control sizes

Limits and validation

Recommendations

GuidancePractice
Do

Set meaningful bounds and steps. Specify locale and formatting when displaying currency or other units.

Usage boundaries

GuidanceBoundary
Scope

Use Input for identifiers such as account numbers. Validate numeric business limits again on submission.

API reference

Public props from @mizen-labs/ui. Use exported prop types for the complete TypeScript contract.

PropTypeDefaultDescription
valuenumber | null—Controlled numeric value.
defaultValuenumber—Initial numeric value for uncontrolled operation.
onValueChange(value: number | null, eventDetails: NumberFieldPrimitive.Root.ChangeEventDetails) => void—Callback invoked when the numeric value changes.
minnumber—Minimum allowed numeric value.
maxnumber—Maximum allowed numeric value.
stepnumber | "any"1Amount by which the value increases or decreases on step.
formatIntl.NumberFormatOptions—Options passed to Intl.NumberFormat for displaying formatted values.
localeIntl.LocalesArgumentnavigator.languageBCP 47 language tag used for formatting and parsing.
disabledbooleanfalsePrevents interaction and communicates the disabled state.
readOnlybooleanfalseRenders in a non-editable, readable presentation.
size"default" | "sm" | "lg""default"Sets control dimensions across the input and steppers.
NumberFieldNumberFieldProps"div"Root numeric field container providing context and state coordination.
NumberFieldGroupNumberFieldGroupProps"div"Container grouping input and steppers with focus ring and borders.
NumberFieldInputNumberFieldInputProps"input"Textbox accepting direct typed input and displaying formatted values.
NumberFieldIncrementNumberFieldIncrementProps"button"Stepper button incrementing the value.
NumberFieldDecrementNumberFieldDecrementProps"button"Stepper button decrementing the value.
NumberFieldScrubAreaNumberFieldScrubAreaProps"span"Interactive area enabling pointer scrubbing.
NumberFieldPrimitivetypeof BaseNumberField—Low-level Base UI number field primitive namespace.
PreviousInput groupNextOTP Field

Choose between 1 and 12 seats.

Formatted with US currency and deterministic fractions.

Current value: 4 (range 1–10, step 1).

Drag horizontally across the label to scrub values.

Drag vertically across the label to scrub values.

Fixed system limit that cannot be altered.

Temporarily unavailable for editing.

Value exceeds maximum allowed network port.

Disabled state takes visual precedence over invalid state.