CompactSlider
is a control for selecting a value from a bounded linear range of values.
The slider is a replacement for the build-in slider and is designed specifically for SwiftUI. For me, the main motivation for writing a component that already exists is the very slow performance under macOS (e.g. when you need to resize the screen with multiple sliders or when animating) and the severely outdated design. At the same time, I was inspired by the slider design that Apple's Photos app developed, which makes heavy use of sliders.
- Requirements
- Installation
- Preview
- Usage.md
- Single Value
- Range Values
- Styling
- Advanced Layout and
CompactSliderState
- Documentation
- Support
- License
- Swift 5.5+
- Xcode 13+
- SwiftUI 2+
- macOS 11+
- iOS 14+
- watchOS 7+
Some of the requirements could be reduced if there is a demand for them.
- In Xcode go to
File
⟩Add Packages...
- Search for the link below and click
Add Package
https://github.com/buh/CompactSlider.git
- Select to which target you want to add it and select
Add Package
macOS
macOS.mov
iPadOS
iPad.mov
iOS
iOS.mov
watchOS
watchOS.mov
- Single Value
- Range Values
- Styling
- Advanced Layout and
CompactSliderState
You can find the generated DocC documentation here.
https://www.buymeacoffee.com/bukhtin
You can buy me a coffee here ☕️
CompactSlider
is available under the MIT license