Closed thompsonate closed 2 years ago
Hi @thompsonate,
This option interactiveTrack
is disabled by default. Here is an example on how to enable it.
ValueSlider(value: $value4)
.valueSliderStyle(
HorizontalValueSliderStyle(
track: LinearGradient(
gradient: Gradient(colors: [.purple, .blue, .purple]),
startPoint: .leading,
endPoint: .trailing
)
.frame(height: 6)
.cornerRadius(3),
thumbSize: CGSize(width: 48, height: 16),
options: .interactiveTrack
)
)
This works great, thank you!
With NSSlider on macOS, you can click on the slider track to move the thumb to the clicked position. When running on macOS, these sliders should do the same.