Lets the shopper type a number or step it up and down with buttons at either end, within a minimum and maximum, such as a quantity. Fills its Field like other controls; never narrower than its two buttons and three digits.
States: Default, Focus, Disabled, Invalid
Parts
Part
File
Does
NumberField
NumberField.vue
Groups all parts of the number field.
NumberFieldContent
NumberFieldContent.vue
Groups the number input with its decrement and increment buttons.
NumberFieldDecrement
NumberFieldDecrement.vue
Lowers the value of the number field by one step.
NumberFieldIncrement
NumberFieldIncrement.vue
Raises the value of the number field by one step.
NumberFieldInput
NumberFieldInput.vue
Lets the user type a number into the number field.
Writes 6 files into components/ui/number-field/. For agents, npx @frontic/ui docs number-field prints this reference as markdown; the MCP server serves the same.
When true, a typed value is kept as-is even if invalid (out of min/max range or off the step grid); step interactions still clamp and snap. The field does not flag the value as invalid (no aria-invalid/data-invalid), so validating and surfacing the error is up to the consumer.
The value the first increment or decrement sets when the field is empty. It is clamped to min/max but not snapped to step. Defaults to min, or 0 when min is not set.