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.
Platform Compatibility
Tags
SwiftUI Code
@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?
More Slider Components
View allSliderTickContentForEach
A type of slider content that creates content by iterating over a collection.
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
Creates a slider to select a value from a given range, subject to a step increment
Explore Other Components
Browse allGlass Button Styles
A button style that applies glass border artwork based on the button’s context
NavigationLinkPickerStyle
A picker style represented by a navigation link that presents the options by pushing a List-style picker view.
CircularProgressViewStyle
The style of a progress view that uses a circular gauge to indicate the partial completion of an activity
Button Styles
A type that applies standard interaction behavior and a custom appearance to all buttons within a view hierarchy
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