Numeric stepper

v1.0

A control for editing a numeric value with buttons to decrease or increase the value.

Considerations

Friendly

Numeric stepper is interactive and provides subtle delight to the experience.

Control

The stepper gives quick control to adjust numeric values through tap or type.

Lightweight

Numeric steppers don’t dominate or interrupt the hierarchy. They fit neatly into a form or page content.

Anatomy

Labeled diagram of a numeric stepper component with six callouts. (1) Label text on the left. (2) Helper text below the label. (3) Container surrounding the entire component. (4) Minus button to decrease quantity. (5) Current value displayed as "2". (6) Plus button to increase quantity.
  1. Label
  2. Hint text
  3. Container
  4. Decrease value
  5. Value
  6. Increase value

Properties

Label

Labels are recommended but not required for the numeric stepper. When used they should be short, concise and quickly describe the field’s purpose.

A numeric stepper with the label “Quantity” placed inside the container, aligned to the left. The component includes a minus button, the current value “2,” and a plus button on the right.

Layout

There are two layouts available for labels: compact and inline. The compact option hugs the actions and value. The inline option has a label positioned horizontally within the stepper.

Consider using the inline layout option when placing the stepper in a form. The compact option should be used when paired with a parent item or associated content, such as an item preview in a cart or when the context is clear and obvious.

Two numeric stepper sizes. The top shows a “Compact” version with minus, value “2,” and plus buttons. The bottom shows an “Inline” version with the label “Quantity” inside the input container, followed by the same stepper controls.

Size

There are 2 sizes available for the stepper: default and large.

Two numeric stepper components shown with height measurements. The top stepper is 40 pixels tall, and the bottom stepper is 48 pixels tall. Both include minus and plus buttons with the value “2” in the center.

Hint text

A subtitle or hint text is available for the stepper but should be used sparingly and only to help show urgency or clarify the value or min/max quantity.

numeric stepper with the label “Quantity” inside the input field and the current value set to 2. Below the component, a hint text reads “Only 6 left,” indicating limited stock.

Minimum value

A minimum value may be set for a stepper, such as a minimum price or item quantity. The default minimum value is zero.

When the minimum value is zero, the decrease button transitions to a delete button when the next action decrements to zero.

When the minimum value is greater than zero, the decrement button is disabled when the value matches the minimum value.

Video description: An animation showing an example of the numeric stepper when it reaches the minimum quantity available. As the user selects either button, the quantity number animates directionally up or down, bringing in the next value in sequence. When the minimum quantity is reached, the icon turns grey and receives a horizontal bump movement to bring further attention to the user. The numeric value also overshoots its final position to emphasize that as well.

Maximum value

A maximum value may be set for a stepper. Once the max value is reached the “add” action is set to a disabled state. The default maximum value is null.

Video description: An animation showing an example of the numeric stepper when it reaches the maximum quantity available. As the user selects either button, the quantity number animates directionally up or down, bringing in the next value in sequence. When the maximum quantity is reached, the icon turns grey and receives a horizontal bump movement to bring further attention to the user. The numeric value also overshoots its final position to emphasize that as well.

Delete

When the minimum value is zero, the decrease button can transitions to a delete button when the next action decreases to zero or removes the associated content.

When the minimum value is greater than zero, the delete button is disabled when the value matches the minimum value.

CAUTION

The delete action is only to be used when the numeric stepper is pair or associated with an item tile such as item list in cart.

Video description: An animation showing the delete function on our stepper. When the user has reached the lowest possible value when in screens such as cart, the icon is a trash can. When selected the container for that item swipes off screen to the left, revealing a delete text and trash can icon within a red color block. The lid of the trash can icon animates up, and then lands back in position. The entire red block then animates up off screen, and the item below moves up into its place.

Behavior

Layer states

Hover is applied at each tapper. Focus is handled at the container level. A disabled state can be applied to the tappers or the container. See Interaction States for more details on layer state styling.

Three numeric stepper states displayed vertically. The top shows the “Hover” state with a cursor over the plus button. The middle shows the “Focus” state with a blue outline around the entire component. The bottom shows the “Disabled” state with faded styling, indicating inactive buttons and text.

Truncation and text wrapping

The title wraps to a second line when extending beyond the width of its container.

The value is clipped or truncated if the value extends beyond the width of its container.

Two examples showing text overflow in a numeric stepper component. The top example demonstrates text wrapping, with the label "Produktmenge" breaking into two lines. The bottom example shows truncation, where a long number value is shortened and ends with an ellipsis (“123456…”).

Tap targets

Each focusable element has a minimum tap target to avoid mistaken clicks or taps.

Comparison of tap target sizes in numeric steppers. The top example labeled “Default” shows standard-sized buttons for minus, value “2,” and plus, each with a pink overlay indicating touch area. The bottom example labeled “Large” displays the same layout with larger pink tap targets for improved accessibility.

Width

Numeric steppers fills the width of it’s parent element up to a max width of 480px.

Input

Tapping or clicking on the value transitions the field to a focused state that accepts a custom input value, similar to a text field. The typing indicator appears at the trailing end of the value and the device keyboard is presented on phones and tablets.

Mobile cart interface showing two items. The first is a set of green folding beach chairs priced at $25.00 (originally $35.00) with a quantity stepper set to 4. The second item is a Funko Pop! Dragon Ball Z Goku figure priced at $34.99. A numeric keypad is open at the bottom of the screen for manual quantity input.

Error

An error message appears when the value is invalid. The message should be concise, direct, and clearly explain how to address the error. The error message replaces any visible helper text and reappears when the error is resolved.

Screen sizes

Small

Mobile product detail page for a “Set of 2 Folding Webbed Beach Chair” priced at $350.00 with free 3-day shipping. The seller is “MA Outdoor Emporium,” rated 4.9 stars and top-rated. Users can select a color from a dropdown field and below that is a numeric stepper labeled “quantity” set to 2, and choose between “Buy it now” or “Make an offer” buttons. Product image thumbnails are displayed at the top.

Medium and large

Best practices

Whole numbers

Do always increment and decrement by whole numbers.

A numeric stepper component with a minus button on the left, the number “4” in the center, and a plus button on the right, all enclosed within a rounded rectangular input container.

Do not use decimals in the value as the range is too large for steppers.

A numeric stepper component with a minus button on the left, the number “4.56” in the center, and a plus button on the right, all enclosed within a rounded rectangular input container.

Text fields vs. Numeric steppers

Do use a text input when flexibility in value entry is required or when strict range boundaries are not critical to the user's task.

Mobile interface for entering package size details. The screen includes fields for weight (1 lb, 13 oz), length (8 in), and width (8 in). Each input field is styled with rounded rectangular borders and labeled with appropriate units. The page title reads “Package size.”

Do not use a numeric stepper when users need to input custom values or when precise range limits are not crucial to the experience.

Mobile interface for editing package size using numeric steppers. The screen includes weight fields with minus and plus buttons set to 8 lb and 12 oz, and dimension fields for length (12 in) and width (16 in). The page title reads “Package size.”

Messaging

Do keep subtitles outside of the stepper as they are strictly for unit values.

Mobile product page for “2 Pcs Folding Webbed Beach Chair” priced at $350.00 with free 3-day shipping. The seller “Maddieforshoes” is top-rated with a 4.9-star rating. Users can select the color (Green & white), adjust quantity using a stepper set to 2, and are informed “Only 4 left.” Below are action buttons: “Buy it now” and “Make an offer.” Product image thumbnails are displayed at the top.

Do not add subtitles, promos or other info inside of steppers.

Mobile product page for “2 Pcs Folding Webbed Beach Chair” priced at $350.00 with free 3-day shipping. The seller “Maddieforshoes” is top-rated with a 4.9-star rating. Users can choose a color (Green & white) and adjust quantity using a stepper set to 2. A red promotional message inside the stepper reads “Buy 3 for 10% off.” Action buttons include “Buy it now” and “Make an offer.” Product image thumbnails are displayed at the top.

Specs

""