Components · Forms · Number Field
Back to Number FieldNumber FieldNew
Use for a bounded numeric value - seats, items, prices - where the exact number matters.
Properties
Size, corner radius and the content options below are properties of the same component, not separate elements - change them to check this component's appearances and states in the Live Preview.
Live Preview
Every appearance side by side, each in every state. One full matrix is rendered per selected Size and Corner radius combination.
When to use
Bounded quantities where the exact number matters.
Component Guide
Overview
Number Field is a bounded numeric spinbutton with stepper buttons, hold-to-repeat, optional prefix and suffix, and optional label scrubbing.
When to Use
- Bounded quantities where the exact number matters.
- Values nudged by steppers, arrow keys or label drag.
When Not to Use
- Approximate positions - use Slider.
- Numeric strings such as phone numbers or codes - use Input.
Best Practices
- Set sensible min and max and show the limit note.
- Keep labels short so they share the width with the limit note.
- Use a suffix function to pluralise (1 seat / 2 seats).
Accessibility
- Input is role=spinbutton with valuenow, min, max and value text.
- Steppers are named "Increase/Decrease <label>" and use aria-disabled at limits.
- Changes and clamps are announced politely.
Related Components
Number, Slider, Input.
{
"component": "Number Field",
"category": "Forms",
"summary": "Number Field is a bounded numeric spinbutton with stepper buttons, hold-to-repeat, optional prefix and suffix, and optional label scrubbing.",
"whenToUse": [
"Bounded quantities where the exact number matters.",
"Values nudged by steppers, arrow keys or label drag."
],
"whenNotToUse": [
"Approximate positions - use Slider.",
"Numeric strings such as phone numbers or codes - use Input."
],
"bestPractices": [
"Set sensible min and max and show the limit note.",
"Keep labels short so they share the width with the limit note.",
"Use a suffix function to pluralise (1 seat / 2 seats)."
],
"accessibility": [
"Input is role=spinbutton with valuenow, min, max and value text.",
"Steppers are named \"Increase/Decrease <label>\" and use aria-disabled at limits.",
"Changes and clamps are announced politely."
],
"relatedComponents": [
"Number",
"Slider",
"Input"
]
}