{"id":13751798,"url":"https://github.com/spacenation/swiftui-sliders","last_synced_at":"2025-04-12T19:47:25.016Z","repository":{"id":37378724,"uuid":"236384068","full_name":"spacenation/swiftui-sliders","owner":"spacenation","description":":rocket: SwiftUI Sliders with custom styles","archived":false,"fork":false,"pushed_at":"2023-09-18T17:15:49.000Z","size":3357,"stargazers_count":874,"open_issues_count":15,"forks_count":94,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-03T23:09:29.253Z","etag":null,"topics":["apple","ios","macos","sliders","swift","swift-library","swift-package","swiftui","swiftui-example","tvos","watchos","xcode"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spacenation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["spacenation"]}},"created_at":"2020-01-26T22:17:22.000Z","updated_at":"2025-03-30T18:38:01.000Z","dependencies_parsed_at":"2024-01-17T01:34:39.382Z","dependency_job_id":"42e8d5b3-9930-437a-aa41-c2d2ecd6a860","html_url":"https://github.com/spacenation/swiftui-sliders","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacenation%2Fswiftui-sliders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacenation%2Fswiftui-sliders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacenation%2Fswiftui-sliders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacenation%2Fswiftui-sliders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spacenation","download_url":"https://codeload.github.com/spacenation/swiftui-sliders/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625497,"owners_count":21135513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple","ios","macos","sliders","swift","swift-library","swift-package","swiftui","swiftui-example","tvos","watchos","xcode"],"created_at":"2024-08-03T09:00:54.932Z","updated_at":"2025-04-12T19:47:24.983Z","avatar_url":"https://github.com/spacenation.png","language":"Swift","funding_links":["https://github.com/sponsors/spacenation"],"categories":["Swift","Slider","UI","🌎 by the community"],"sub_categories":["Content","Slider"],"readme":"## Custom SwiftUI sliders and tracks.\nThis package allows you to build highly customizable sliders and tracks for iOS, macOS and Mac Catalyst. \n\n### Features\n- Build your own sliders and tracks using composition\n- Highly customizable\n- Horizontal and Vertical styles\n- Range sliders with minimum/maximum value distance\n- XY sliders\n- Different sizes for lower and upper range thumbs\n\n\u003ccenter\u003e\n\u003cimg src=\"Resources/sliders.png\"/\u003e\n\u003c/center\u003e\n\n### Styles\n- HorizontalValueSliderStyle\n- VerticalValueSliderStyle\n- HorizontalRangeSliderStyle\n- VerticalRangeSliderStyle\n- RectangularPointSliderStyle\n\n## How to use\n\nAdd this swift package to your project\n```\ngit@github.com:spacenation/swiftui-sliders.git\n```\n\nImport and use\n\n```swift\nimport Sliders\nimport SwiftUI\n\nstruct ContentView: View {\n    @State var value = 0.5\n    @State var range = 0.2...0.8\n    @State var x = 0.5\n    @State var y = 0.5\n    \n    var body: some View {\n        Group {\n            ValueSlider(value: $value)\n            RangeSlider(range: $range)\n            PointSlider(x: $x, y: $y)\n        }\n    }\n}\n```\nSee the preview of each file to see an example\n\n## Customization with style\nUse any SwiftUI view modifiers to create custom tracks and thumbs.\n\n```swift\nRangeSlider(range: $model.range2, distance: 0.1 ... 1.0)\n    .rangeSliderStyle(\n        HorizontalRangeSliderStyle(\n            track:\n                HorizontalRangeTrack(\n                    view: Capsule().foregroundColor(.purple)\n                )\n                .background(Capsule().foregroundColor(Color.purple.opacity(0.25)))\n                .frame(height: 8),\n            lowerThumb: Circle().foregroundColor(.purple),\n            upperThumb: Circle().foregroundColor(.purple),\n            lowerThumbSize: CGSize(width: 32, height: 32),\n            upperThumbSize: CGSize(width: 32, height: 32),\n            options: .forceAdjacentValue\n        )\n    )\n```\n\n## SDKs\n- iOS 13+\n- Mac Catalyst 13.0+\n- macOS 10.15+\n- Xcode 11.0+\n\n## Code Contributions\nFeel 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.\n\n## Become a Sponsor\nIf you find this project useful please consider becoming our GitHub sponsor.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacenation%2Fswiftui-sliders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspacenation%2Fswiftui-sliders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacenation%2Fswiftui-sliders/lists"}