Adjust a number
Use the stepper buttons when users need to increase or decrease a quantity.
The quantity toggle component is used to increase or decrease an incremental value.
Use the stepper buttons when users need to increase or decrease a quantity.
Min, max, and step values help keep quantities within the allowed range.
Use quantity toggles for tickets, bookings, orders, and similar counts.
Decrement action
Input value
Increment action
Use the min and max attributes to constrain the value within an allowed range.
Sets a minimum and maximum so users cannot decrement below 0 or increment above 5.
Use step to control how much the value changes each time the increment or decrement button is pressed.
The default. Each press of the increment or decrement button changes the value by one unit.
Add hint text to clarify constraints such as a maximum allowed quantity.
Default. Use when the label alone is enough.
Use the read-only state when the value should be visible but not editable.
The default. Users can adjust the value with the increment and decrement buttons or by typing.
Use the disabled state to prevent interaction when the field is not available in the current context.
The default. The quantity toggle is interactive and accepts input.
When the value is invalid, surface inline feedback so users can correct the input.
No feedback styling. Use when the field has no validation requirements.
Each row is a colour, spacing, or size value the component uses, and the right-most column tells you where in the component you'll see it.
sgds-gap-none—sgds-form-border-width-defaultWidth variessgds-form-border-radius-md—sgds-dimension-0—sgds-icon-size-md—Quantity toggle is for items adjusted in single units, such as tickets or copies. For large numbers, use a number input.
Numbers without a count meaning, postcodes, IDs, amounts, do not belong in a quantity toggle.
Use min and max to constrain the field to accepted values, and use hintText to tell users the maximum before they adjust it.
If users may need to enter values like 250 or 1,000, repeated incrementing becomes tedious. Use sgds-input type=number instead.
Always provide a label so users know what they count. Add hint text when the maximum is meaningful.
Currency, measurements, percentages, or decimals need direct entry and clearer validation. Quantity toggle works best for whole-number counts.
Increment by 1 for single-unit adjustments. Use a larger step only when typical adjustments are bigger.
If there is a meaningful min or max, do not make users discover it by pressing the buttons. Show the limit in the label or hintText.
When the value falls outside the allowed range, set hasFeedback and invalid with a clear invalidFeedback.
A disabled quantity toggle is excluded from form submission. Use readonly when the value should stay visible, unchanged, and still be submitted.
TabShift+TabNumber keysBackspace↓ Downor↑ Upor← Leftor→ RightShare them with us on Slack → #ask-sgds-v3
Report it on GitHub Issues → sgds/components/quantity-toggle
The Singapore Government Design System was developed to empower teams in creating fast, accessible and mobile-friendly digital services.