spacenation / Swiftui Sliders
Licence: mit
🚀 SwiftUI Sliders with custom styles
Stars: ✠241
Programming Languages
swift
15916 projects
Projects that are alternatives of or similar to Swiftui Sliders
Swiftui
A collaborative list of awesome SwiftUI resources. Feel free to contribute!
Stars: ✠774 (+221.16%)
Mutual labels: apple, xcode, tvos, watchos
Swiftui Charts
🚀 SwiftUI Charts with custom styles
Stars: ✠272 (+12.86%)
Mutual labels: apple, xcode, tvos, watchos
Swiftui Shapes
🚀 Collection of SwiftUI shapes
Stars: ✠137 (-43.15%)
Mutual labels: apple, xcode, tvos, watchos
Swiftui Grid
🚀 SwiftUI Grid layout with custom styles
Stars: ✠872 (+261.83%)
Mutual labels: apple, xcode, tvos, watchos
Apple Runtime Headers
Objective-C runtime headers for Apple's iOS, macOS, tvOS and watchOS frameworks
Stars: ✠174 (-27.8%)
Mutual labels: apple, tvos, watchos
Articles Zh Hans
Articles for NSHipster.cn
Stars: ✠113 (-53.11%)
Mutual labels: xcode, tvos, watchos
Sqlitelib
Easily build a custom SQLite static library for use in macOS and iOS frameworks and apps.
Stars: ✠38 (-84.23%)
Mutual labels: xcode, tvos, watchos
Conbini
Publishers, operators, and subscribers to supplement Combine.
Stars: ✠109 (-54.77%)
Mutual labels: apple, tvos, watchos
Nord Xcode
An arctic, north-bluish clean and elegant Xcode color theme.
Stars: ✠63 (-73.86%)
Mutual labels: apple, xcode, tvos
R.swift
Strong typed, autocompleted resources like images, fonts and segues in Swift projects
Stars: ✠8,419 (+3393.36%)
Mutual labels: xcode, tvos, watchos
Swifterswift
A handy collection of more than 500 native Swift extensions to boost your productivity.
Stars: ✠10,706 (+4342.32%)
Mutual labels: xcode, tvos, watchos
Fugen
Command line tool for exporting resources and generating code from your Figma files
Stars: ✠41 (-82.99%)
Mutual labels: xcode, tvos, watchos
Cloudkitgdpr
Framework for allowing users to manage data stored in iCloud
Stars: ✠126 (-47.72%)
Mutual labels: xcode, tvos, watchos
Apprepositorytemplate
The easiest way to start a new application project without any manual configuration
Stars: ✠24 (-90.04%)
Mutual labels: xcode, tvos, watchos
Human Interface Guidelines Extras
Community additions to Apple's Human Interface Guidelines
Stars: ✠225 (-6.64%)
Mutual labels: apple, tvos, watchos
Custom SwiftUI sliders and tracks.
This package allows you to build highly customizable sliders and tracks for iOS, macOS and Mac Catalyst.
Features
- Build your own sliders and tracks using composition
- Highly customizable
- Horizontal and Vertical styles
- Range and XY values
- Different sizes for lower and upper range thumbs
Styles
- HorizontalValueSliderStyle
- VerticalValueSliderStyle
- HorizontalRangeSliderStyle
- VerticalRangeSliderStyle
- RectangularPointSliderStyle
How to use
Add this swift package to your project
[email protected]:spacenation/swiftui-sliders.git
Import and use
import Sliders
import SwiftUI
struct ContentView: View {
@State var value = 0.5
@State var range = 0.2...0.8
@State var x = 0.5
@State var y = 0.5
var body: some View {
Group {
ValueSlider(value: $value)
RangeSlider(range: $range)
PointSlider(x: $x, y: $y)
}
}
}
For more examples open /Examples/SlidersExamples.xcodeproj
Customization with style
Use any SwiftUI view modifiers to create custom tracks and thumbs.
RangeSlider(range: $model.range2)
.rangeSliderStyle(
HorizontalRangeSliderStyle(
track:
HorizontalRangeTrack(
view: Capsule().foregroundColor(.purple)
)
.background(Capsule().foregroundColor(Color.purple.opacity(0.25)))
.frame(height: 8),
lowerThumb: Circle().foregroundColor(.purple),
upperThumb: Circle().foregroundColor(.purple),
lowerThumbSize: CGSize(width: 32, height: 32),
upperThumbSize: CGSize(width: 32, height: 32),
options: .forceAdjacentValue
)
)
SDKs
- iOS 13+
- Mac Catalyst 13.0+
- macOS 10.15+
- Xcode 11.0+
Roadmap
- Circular sliders and tracks
Code Contributions
Feel free to contribute via fork/pull request to master branch. If you want to request a feature or report a bug please start a new issue.
Coffee Contributions
If you find this project useful please consider becoming my GitHub sponsor.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].