Forms
Number field
Captures and formats numeric input with stepping, bounds, and scrub interactions.
Usage
Anatomy
The parts and how they nest, taken from the preview above.
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
| Guidance | Practice |
|---|---|
| Do | Set meaningful bounds and steps. Specify locale and formatting when displaying currency or other units. |
Usage boundaries
| Guidance | Boundary |
|---|---|
| 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.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | Controlled numeric value. |
| | — | Initial numeric value for uncontrolled operation. |
| | — | Callback invoked when the numeric value changes. |
| | — | Minimum allowed numeric value. |
| | — | Maximum allowed numeric value. |
| | 1 | Amount by which the value increases or decreases on step. |
| | — | Options passed to Intl.NumberFormat for displaying formatted values. |
| | navigator.language | BCP 47 language tag used for formatting and parsing. |
| | false | Prevents interaction and communicates the disabled state. |
| | false | Renders in a non-editable, readable presentation. |
| | "default" | Sets control dimensions across the input and steppers. |
| | "div" | Root numeric field container providing context and state coordination. |
| | "div" | Container grouping input and steppers with focus ring and borders. |
| | "input" | Textbox accepting direct typed input and displaying formatted values. |
| | "button" | Stepper button incrementing the value. |
| | "button" | Stepper button decrementing the value. |
| | "span" | Interactive area enabling pointer scrubbing. |
| | — | Low-level Base UI number field primitive namespace. |