Interactive previews iPhone

Stepped Slider

Creates a slider to select a value from a given range, subject to a step increment

Stepped Slider - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview

Platform Compatibility

iOS 13.0+ iPadOS 13.0+ macOS 10.15+ watchOS 6.0+ visionOS 1.0+

Tags

SwiftUI Code

Docs
@State private var speed = 40.0
@State private var isEditing = false

var body: some View {
  Slider(
  value: $speed,
  in: 0 ... 100,
  step: 10,
  label: {
    Text("Foo") // for accessibility, enables ticks
  },
  onEditingChanged: { editing in
  isEditing = editing
}
)
}

Found an issue or have a suggestion?

Created: June 4, 2025Updated: December 27, 2025

More Slider Components

View all
SliderTickContentForEach - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

SliderTickContentForEach

A type of slider content that creates content by iterating over a collection.

Custom Slider Ticks - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Custom Slider Ticks

Creates a slider to select a value from a given range, subject to a step increment, which displays the provided labels and customizable ticks.

Slider Color - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

Slider Color

Customizing the color of the slider

Stepped Min Max Label Slider - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Stepped Min Max Label Slider

Creates a slider to select a value from a given range, subject to a step increment, which displays the provided labels

Slider - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Slider

Creates a slider to select a value from a given range

Explore Other Components

Browse all
Nested Menu - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
content

Nested Menu

A Menu inside a Menu

Default Min List Header Height - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
modifier

Default Min List Header Height

The default minimum height of a header in a list.

ControlSize - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

ControlSize

A control version that is the default size

Materials - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
type

Materials

All materials

Single Subscription Store View - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Single Subscription Store View

Creates a view that loads subscriptions based on a collection of product identifiers, and merchandises them with automatic marketing content.

Refreshable List - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
modifier

Refreshable List

Marks this view as refreshable.

AccessoryCircularCapacityGaugeStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

AccessoryCircularCapacityGaugeStyle

A gauge style that displays a closed ring that’s partially filled in to indicate the gauge’s current value

AccessoryCircularGaugeStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

AccessoryCircularGaugeStyle

A gauge style that displays an open ring with a marker that appears at a point along the ring to indicate the gauge’s current value