Interactive previews iPhone

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.

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

Platform Compatibility

iOS 26.0+ iPadOS 26.0+ macOS 26.0+ watchOS 26.0+ visionOS 26.0+

Tags

SwiftUI Code

Docs
@State private var speed = 42.0
    
var body: some View {
        Slider(value: $speed) {
            Text("Foo")
        } ticks: {
            SliderTick(0.2)
            SliderTick(0.6)
            SliderTick(0.8)
        }
    }

Found an issue or have a suggestion?

Created: June 10, 2025Updated: December 27, 2025
Connect Wizard

Connect Wizard

Unlock insights App Store Connect doesn’t show you.

Get Started

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.

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

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

Stepped Slider

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

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
Glass Button Styles - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

Glass Button Styles

A button style that applies glass border artwork based on the button’s context

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

NavigationLinkPickerStyle

A picker style represented by a navigation link that presents the options by pushing a List-style picker view.

Semantic Colors - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
type

Semantic Colors

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

CircularProgressViewStyle

The style of a progress view that uses a circular gauge to indicate the partial completion of an activity

Button Styles - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

Button Styles

A type that applies standard interaction behavior and a custom appearance to all buttons within a view hierarchy

Container Content Margins - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Container Content Margins

Adds the margins of the container the view is in.

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

ContainerRelativeShape

A shape that is replaced by an inset version of the current container shape. If no container shape was defined, is replaced by a rectangle

Toolbar Item Visibility Priority - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Toolbar Item Visibility Priority

Defines the visibility priority for a toolbar item.