{"id":13637826,"url":"https://github.com/onl1ner/STDiscreteSlider","last_synced_at":"2025-04-19T17:31:51.874Z","repository":{"id":62454430,"uuid":"396821691","full_name":"onl1ner/STDiscreteSlider","owner":"onl1ner","description":"🎚️ STDiscreteSlider – slider which allows user to choose value only from predefined set of data.","archived":false,"fork":false,"pushed_at":"2021-08-19T16:48:49.000Z","size":113,"stargazers_count":17,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T04:04:21.307Z","etag":null,"topics":["cocoapods","component","discrete","discrete-slider","ios","pods","slide","slider","spm","swift","swift-package-manager","swiftui","ui","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/onl1ner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-16T14:05:20.000Z","updated_at":"2025-02-17T05:31:03.000Z","dependencies_parsed_at":"2022-11-01T22:46:22.053Z","dependency_job_id":null,"html_url":"https://github.com/onl1ner/STDiscreteSlider","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onl1ner%2FSTDiscreteSlider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onl1ner%2FSTDiscreteSlider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onl1ner%2FSTDiscreteSlider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onl1ner%2FSTDiscreteSlider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onl1ner","download_url":"https://codeload.github.com/onl1ner/STDiscreteSlider/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249750020,"owners_count":21320064,"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":["cocoapods","component","discrete","discrete-slider","ios","pods","slide","slider","spm","swift","swift-package-manager","swiftui","ui","xcode"],"created_at":"2024-08-02T01:00:34.538Z","updated_at":"2025-04-19T17:31:51.570Z","avatar_url":"https://github.com/onl1ner.png","language":"Swift","funding_links":[],"categories":["Content"],"sub_categories":["Slider"],"readme":"\u003cimg align=\"right\" src=\"https://github.com/onl1ner/onl1ner/blob/master/Resources/STDiscreteSlider/logo.png?raw=true\" width=\"256\"/\u003e\n\n# STDiscreteSlider\n\n![](https://img.shields.io/badge/platform-iOS-lightgrey)\n![](https://img.shields.io/badge/iOS-13.0%2B-blue)\n![](https://cocoapod-badges.herokuapp.com/v/STDiscreteSlider/badge.png)\n![](https://cocoapod-badges.herokuapp.com/l/STDiscreteSlider/badge.(png|svg))\n![](https://img.shields.io/badge/Swift-5-orange?logo=Swift\u0026logoColor=white)\n![](https://img.shields.io/github/last-commit/onl1ner/STDiscreteSlider)\n\n**STDiscreteSlider** – slider which allows user to choose value only from predefined set of data. Slider may receive any types of options, you may pass set of integers or strings, or any other type. Written using `SwiftUI`.\n\n## Table of contents\n\n* [Requirements](#requirements)\n* [Installation](#installation)\n    * [CocoaPods](#cocoapods)\n    * [Swift Package Manager](#swift-package-manager)\n* [Usage](#usage)\n    * [Quick start](#quick-start)\n    * [Customization](#customization)\n* [Contribution](#contribution)\n* [License](#license)\n\n## Requirements\n\n- SwiftUI\n- iOS 13.0 or above\n\n## Installation\n\n**STDiscreteSlider** is available through [CocoaPods](https://cocoapods.org) and [Swift Package Manager](https://github.com/apple/swift-package-manager)\n\n### CocoaPods\n- Add the following line into your Podfile:\n\n  ```ruby\n  pod 'STDiscreteSlider'\n  ```\n\n- Then run this command in your terminal:\n\n  ```bash\n  $ pod install\n  ```\n  \n### Swift Package Manager\n- In Xcode select: \n\n  ```\n  File \u003e Swift Packages \u003e Add Package Dependency...\n  ```\n  \n- Then paste this URL: \n\n  ```\n  https://github.com/onl1ner/STDiscreteSlider.git\n  ```\n\n## Usage\n\n**STDiscreteSlider** is highly customizable, you could use it with it's default appearance or create your own.\n\n### Quick start\n\nTo create a slider simply instantiate `STDiscreteSlider` class:\n\n```swift\nSTDiscreteSlider(\n    options: [20, 40, 60, 80, 100], // Options that is used as a data source for the slider.\n    selectedItem: $mySelectedItem   // Binding to the property that will store the selected item.\n)\n```\n\nThis action will create a slider with default appearance.\n\n### Customization\n\nCustomization of a slider is not a big deal. **STDiscreteSlider** provides three protocols that is used to represent the components of a slider: `SliderTrack`, `SliderTick`, `SliderHandle`. By implementing each of the protocol you will be able to build your custom slider.\n\nSome examples of what you can achieve by customizing slider: \n\n![](https://github.com/onl1ner/onl1ner/blob/master/Resources/STDiscreteSlider/Examples.png?raw=true)\n\n*Source code of these sliders provided in examples.*\n\n## Contribution\n\nIf you struggle with something feel free to [open an issue](https://github.com/onl1ner/STDiscreteSlider/issues/new). Pull requests are also appreciated.\n\n## License\n\n**STDiscreteSlider** is under the terms and conditions of the MIT license.\n\n```\nMIT License\n\nCopyright (c) 2021 Tamerlan Satualdypov\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonl1ner%2FSTDiscreteSlider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonl1ner%2FSTDiscreteSlider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonl1ner%2FSTDiscreteSlider/lists"}