{"id":2771,"url":"https://github.com/yonat/MultiSlider","last_synced_at":"2025-08-06T14:33:00.177Z","repository":{"id":38485569,"uuid":"74101353","full_name":"yonat/MultiSlider","owner":"yonat","description":"UISlider clone with multiple thumbs and values, range highlight, optional snap intervals, optional value labels, either vertical or horizontal.","archived":false,"fork":false,"pushed_at":"2025-05-24T06:51:03.000Z","size":359,"stargazers_count":514,"open_issues_count":3,"forks_count":113,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-07-01T03:41:24.225Z","etag":null,"topics":["multiple-thumbs","multislider","range-picker","range-slider","swift","thumbs","uislider"],"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/yonat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["yonat"]}},"created_at":"2016-11-18T06:21:47.000Z","updated_at":"2025-06-30T22:26:05.000Z","dependencies_parsed_at":"2024-06-18T21:18:08.134Z","dependency_job_id":"9e565691-b40a-4a36-848d-84b2c858414a","html_url":"https://github.com/yonat/MultiSlider","commit_stats":{"total_commits":168,"total_committers":8,"mean_commits":21.0,"dds":0.0892857142857143,"last_synced_commit":"e41c35f7d5708fefe86d3a14648d12d2635191ff"},"previous_names":[],"tags_count":65,"template":false,"template_full_name":null,"purl":"pkg:github/yonat/MultiSlider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yonat%2FMultiSlider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yonat%2FMultiSlider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yonat%2FMultiSlider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yonat%2FMultiSlider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yonat","download_url":"https://codeload.github.com/yonat/MultiSlider/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yonat%2FMultiSlider/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268415835,"owners_count":24246811,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["multiple-thumbs","multislider","range-picker","range-slider","swift","thumbs","uislider"],"created_at":"2024-01-05T20:16:22.411Z","updated_at":"2025-08-06T14:32:59.875Z","avatar_url":"https://github.com/yonat.png","language":"Swift","funding_links":["https://github.com/sponsors/yonat"],"categories":["UI","Libs","UI [🔝](#readme)","OOM-Leaks-Crash"],"sub_categories":["Slider","UI","Other free courses"],"readme":"# MultiSlider\nUISlider clone with multiple thumbs and values, range highlight, optional snap values, optional value labels, either vertical or horizontal.\n\n[![Swift Version][swift-image]][swift-url]\n[![Build Status][travis-image]][travis-url]\n[![License][license-image]][license-url]\n[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/MultiSlider.svg)](https://img.shields.io/cocoapods/v/MultiSlider.svg)\n[![Platform](https://img.shields.io/cocoapods/p/MultiSlider.svg?style=flat)](http://cocoapods.org/pods/MultiSlider)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"Screenshots/MultiSlider.png\"\u003e\n\u003c/p\u003e\n\n## Features\n\n* Multiple thumbs\n* Range slider (optional) - track color between thumbs different from track color outside thumbs\n* Vertical (optional)\n* Value labels (optional)\n* Snap steps or specific snap values (optional)\n* Haptic feedback (optional)\n* Configurable thumb image, minimum and maximum images.\n* Configurable track width, color, rounding.\n\n## Usage\n\n```swift\nlet slider = MultiSlider()\nslider.minimumValue = 1    // default is 0.0\nslider.maximumValue = 5    // default is 1.0\n\nslider.value = [1, 4.5, 5]\n\nslider.addTarget(self, action: #selector(sliderChanged(_:)), for: .valueChanged) // continuous changes\nslider.addTarget(self, action: #selector(sliderDragEnded(_:)), for: . touchUpInside) // sent when drag ends\n```\n\n### SwiftUI Usage\n\n```swift\n@State var valueArray: [CGFloat] = [7, 13]\n// ...\nMultiValueSlider(value: $valueArray, minimumValue: 1, maximumValue: 5)\n```\n\nThe properties mentioned below can be used as modifiers, or passed as arguments to the `MultiValueSlider` initializer. For example:\n\n```swift\nMultiValueSlider(value: $valueArray, outerTrackColor: .lightGray)\n    .thumbTintColor(.blue)\n```\n\n\n### Getting multiple thumb values\n\nUse `value` to get all thumbs values, and `draggedThumbIndex` to find which thumb was last moved.\n\n```swift\nfunc sliderChanged(slider: MultiSlider) {\n    print(\"thumb \\(slider.draggedThumbIndex) moved\")\n    print(\"now thumbs are at \\(slider.value)\") // e.g., [1.0, 4.5, 5.0]\n}\n```\n\n### Range slider\n\n```swift\nslider.outerTrackColor = .lightGray // outside of first and last thumbs\n```\n\n### Vertical / horizontal orientation\n\n```swift\nslider.orientation = .horizontal // default is .vertical\nslider.isVertical = false // same effect, but accessible from Interface Builder\n```\n\n### Value labels\n\n```swift\nslider.valueLabelPosition = .left // .notAnAttribute = don't show labels\nslider.valueLabelAlternatePosition = true // alternate left and right positions (false by default)\nslider.isValueLabelRelative = true // show differences between thumbs instead of absolute values\nslider.valueLabelFormatter.positiveSuffix = \" 𝞵s\"\nslider.valueLabelColor = .green\nslider.valueLabelFont = someFont\n```\n\nFor more control over the label text:\n\n```swift\nslider.valueLabelTextForThumb = { thumbIndex, thumbValue in\n    [\"Parasol\", \"Umbrella\"][thumbIndex] + \" \\(thumbValue)\"\n}\n```\n\n### Snap steps\n\n```swift\nslider.snapStepSize = 0.5 // default is 0.0, i.e. don't snap\nslider.snapValues = [1, 2, 4, 8] // specify specific snap values instead uniform steps\nslider.isHapticSnap = false // default is true, i.e. generate haptic feedback when sliding over snap values\nslider.snapImage = UIImage(systemName: \"circle.fill\") // default: no image\n```\n\n### Changing Appearance\n\n```swift\nslider.tintColor = .cyan // color of track\nslider.thumbTintColor = .blue // color of thumbs\nslider.trackWidth = 32\nslider.hasRoundTrackEnds = true\nslider.showsThumbImageShadow = false // wide tracks look better without thumb shadow\nslider.centerThumbOnTrackEnd = true // when thumb value is minimum or maximum, align it's center with the track end instead of its edge\n```\n\n### Images\n\n```swift\n// add images at the ends of the slider:\nslider.minimumImage = UIImage(named: \"clown\")\nslider.maximumImage = UIImage(named: \"cloud\")\n\n// change image for all thumbs:\nslider.thumbImage = UIImage(named: \"balloon\")\n\n// or let each thumb have a different image:\nslider.thumbViews[0].image = UIImage(named: \"ball\")\nslider.thumbViews[1].image = UIImage(named: \"club\")\n\n// expand drag area when using a small thumb image:\nslider.thumbTouchExpansionRadius = 16\n```\n\n### Distance/Overlap Between Thumbs\n\n```swift\n// allow thumbs to overlap:\nslider.keepsDistanceBetweenThumbs = false\n\n// make thumbs keep a greater distance from each other (default = half the thumb size):\nslider.distanceBetweenThumbs = 3.14\n```\n\n### Disabling/freezing thumbs\n\n```swift\nslider.disabledThumbIndices = [1, 3]\n```\n\n## Requirements\n\n- iOS 9.0+\n- Xcode 10\n\n## Installation\n\n### CocoaPods:\n\n```ruby\npod 'MultiSlider'\n```\n\nLegacy versions:\n\n| Swift version | MultiSlider version |\n| :---: | :--- |\n| 4.0 (Xcode 9.4) | `pod 'MiniLayout', '~\u003e 1.2.1'`\u003cbr\u003e`pod 'MultiSlider', '~\u003e 1.6.0'` |\n| 3 | `pod 'MiniLayout', '~\u003e 1.1.0'`\u003cbr\u003e`pod 'MultiSlider', '~\u003e 1.1.2'` |\n| 2.3 | `pod 'MiniLayout', '~\u003e 1.0.1'`\u003cbr\u003e`pod 'MultiSlider', '~\u003e 1.0.1'` |\n\n### Swift Package Manager:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/yonat/MultiSlider\", from: \"2.2.0\")\n]\n```\n\n## Meta\n\n[@yonatsharon](https://twitter.com/yonatsharon)\n\n[https://github.com/yonat/MultiSlider](https://github.com/yonat/MultiSlider)\n\n[swift-image]:https://img.shields.io/badge/swift-5.0-orange.svg\n[swift-url]: https://swift.org/\n[license-image]: https://img.shields.io/badge/License-MIT-blue.svg\n[license-url]: LICENSE.txt\n[travis-image]: https://img.shields.io/travis/dbader/node-datadog-metrics/master.svg?style=flat-square\n[travis-url]: https://travis-ci.org/dbader/node-datadog-metrics\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyonat%2FMultiSlider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyonat%2FMultiSlider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyonat%2FMultiSlider/lists"}