A slider empowering users to effortlessly adjust values by simply touching anywhere

TouchSlider

A slider empowering users to effortlessly adjust values by simply touching anywhere.


Instructions

@State var value: Double = 0

...

TouchSlider(
  direction: .horizontal,
  value: $touchSlider_value,
  speed: 1, // multiplier to track gesture translation.
  foregroundColor: Color.red,
  backgroundColor: Color(white: 0.5, opacity: 0.3),
  cornerRadius: 16
)
.frame(height: 80)

GitHub

View Github