selection/DSStepper

DSStepper

selection
since 0.1.0

Numeric input with − and + buttons. Respects min/max bounds and disables the buttons at limits.

iOS 17+macOS 14+watchOS 10+tvOS 17+visionOS 1+

Purpose

Quantity selectors in cart items, ticket booking, and numeric configuration.

Interactive Reference

Live showroom

Need the full visual surface?

Screenshots do not scale well across every component, state, and variant. For the real interactive reference, import the package and launch DSShowcaseRoot().

Best for exploring:

variants, states, categories, and real app examples in one place.

Props

PropTypeDefaultDescription
valuereqBinding<Int>—Bound integer value.
minValueInt1Lowest allowed value.
maxValueInt99Highest allowed value.
accessibilityDecrementLabelString?nilVoiceOver label for the minus button.
accessibilityIncrementLabelString?nilVoiceOver label for the plus button.
accessibilityValueLabelString?nilVoiceOver label for the value.
colorColor?nilButton tint. nil uses the theme primary.

Examples

Cart quantity

Quantity stepper in a cart row.

swift
DSStepper(value: $item.quantity, minValue: 1, maxValue: 10, accessibilityValueLabel: "Quantity")

Related Components