{"id":21823781,"url":"https://github.com/buh/compactslider","last_synced_at":"2025-05-15T16:03:19.278Z","repository":{"id":40656152,"uuid":"485437450","full_name":"buh/CompactSlider","owner":"buh","description":"CompactSlider is a SwiftUI control for macOS, iOS, watchOS and visionOS.","archived":false,"fork":false,"pushed_at":"2025-03-26T10:00:43.000Z","size":1217,"stargazers_count":472,"open_issues_count":2,"forks_count":30,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-31T20:08:57.098Z","etag":null,"topics":["control","ios","ipados","macos","slider","swift","swiftui","ui-components","visionos","watchos"],"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/buh.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,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://www.buymeacoffee.com/bukhtin","https://paypal.me/bukhtin"]}},"created_at":"2022-04-25T15:55:43.000Z","updated_at":"2025-03-28T08:25:29.000Z","dependencies_parsed_at":"2024-01-14T03:46:43.237Z","dependency_job_id":"74151e22-1087-4d19-a6de-92295cdd8571","html_url":"https://github.com/buh/CompactSlider","commit_stats":{"total_commits":61,"total_committers":2,"mean_commits":30.5,"dds":"0.016393442622950838","last_synced_commit":"6d591a76caecd583ad69fbcd06f2fb83135318c0"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buh%2FCompactSlider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buh%2FCompactSlider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buh%2FCompactSlider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buh%2FCompactSlider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buh","download_url":"https://codeload.github.com/buh/CompactSlider/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247730069,"owners_count":20986404,"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":["control","ios","ipados","macos","slider","swift","swiftui","ui-components","visionos","watchos"],"created_at":"2024-11-27T17:37:12.144Z","updated_at":"2025-04-07T21:13:44.066Z","avatar_url":"https://github.com/buh.png","language":"Swift","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"640\" alt=\"CompactSlider\" src=\"https://github.com/user-attachments/assets/1b4fb8d0-45ab-4c6c-923f-4a4c6813aaf8\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/v/release/buh/CompactSlider\" /\u003e\n  \u003cimg src=\"https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fbuh%2FCompactSlider%2Fbadge%3Ftype%3Dswift-versions\" /\u003e\n  \u003cimg src=\"https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fbuh%2FCompactSlider%2Fbadge%3Ftype%3Dplatforms\" /\u003e\n  \u003ca href=\"https://github.com/buh/CompactSlider/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/buh/CompactSlider\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n`CompactSlider` is a highly customizable multi-purpose slider control for SwiftUI. It can be used to select a single value, or a range of values, or multiple values, or a point in a grid, or a polar point in a circular grid. The slider can be displayed horizontally, vertically, or in a (circular) grid. The slider can be customized with a variety of styles and options, including the possibility to design your own style.\n\nThe 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 12 and below (e.g. when you need to resize the screen with multiple sliders or when animating) and the severely outdated design at that time. \n\nI was inspired by the slider design that Apple's [Photos](https://support.apple.com/guide/photos/adjust-white-balance-pht9b1d4a744/10.0/mac/15.0) app developed, which makes heavy use of sliders. Also new sliders in the [Camera](https://www.apple.com/v/iphone-16-pro/d/images/overview/photographic-styles/megapixels__dhiskrxv388y_large_2x.jpg) app on iPhone 16 Pro.\n\n## Slider Types\n\nThe slider basically defines two variants: a linear slider and a grid slider. The linear slider can be horizontal or vertical, and also scrollable, where the handle is still and the scale is moving.\n\nThe grid slider can be used to select a point in a grid or a polar point in a circular grid. The point in the grid represents a value of the x and y axis. The polar point represents a value of the angle and radius.\n\nPossible slider types defined by the `CompactSliderType`:\n - a horizontal slider with alignments: leading, center, trailing.\n - a vertical slider with alignments: top, center, bottom.\n - a scrollable horizontal slider.\n - a scrollable vertical slider.\n - a grid slider.\n - a circular grid slider.\n\n# Requirements\n\n- Swift 5.9+\n- Xcode 16+ (Use `xcode15` branch, if you have to use Xcode 15)\n- SwiftUI 3+\n- macOS 12+\n- iOS 15+\n- watchOS 8+\n- visionOS 1+\n\n# Installation \n\n1. In Xcode go to `File` ⟩ `Add Packages...`.\n2. Search for the link below and click `Add Package`:\n```\nhttps://github.com/buh/CompactSlider.git\n```\n3. Select to which target you want to add it and select `Add Package`.\n\n# Documentation\n\n### Getting started\n- [`CompactSlider`](https://swiftpackageindex.com/buh/compactslider/2.0.6/documentation/compactslider/compactslider)\n- [`DefaultCompactSliderStyle`](https://swiftpackageindex.com/buh/compactslider/2.0.6/documentation/compactslider/defaultcompactsliderstyle)\n- [`SystemSlider`](https://swiftpackageindex.com/buh/compactslider/2.0.6/documentation/compactslider/systemslider)\n\n### The default style composition\n\n\u003cimg width=\"576\" alt=\"image\" src=\"https://github.com/user-attachments/assets/2320584c-6dc8-49a4-8193-05c09bd484f4\" /\u003e\n\n## Demo\n\nThe demo package contains several use cases.\n\n`Demo`\n| macOS  | iOS |\n| ------------- | ------------- |\n| \u003cimg width=\"387\" alt=\"macOS\" src=\"https://github.com/user-attachments/assets/44d1751c-2e99-4e62-ab8b-1ee011cebd11\" /\u003e | \u003cimg width=\"391\" alt=\"iOS\" src=\"https://github.com/user-attachments/assets/a2fa2bbf-f9e1-4fbd-a754-9e08dfc45a16\" /\u003e |\n| \u003cimg width=\"390\" alt=\"macOS\" src=\"https://github.com/user-attachments/assets/d5dfacca-26c1-4a0f-909a-309df4b60abf\" /\u003e | \u003cimg width=\"392\" alt=\"iOS\" src=\"https://github.com/user-attachments/assets/c619bed8-5634-4554-88f6-cac6bfa70587\" /\u003e |\n| \u003cimg width=\"420\" alt=\"macOS\" src=\"https://github.com/user-attachments/assets/16fb1ad5-0173-4f1b-8ec0-73070ae066f4\" /\u003e | \u003cimg width=\"391\" alt=\"iOS\" src=\"https://github.com/user-attachments/assets/167dc5ea-49b0-4b8c-b7e3-00337bce050c\" /\u003e |\n\n`GridDemo`\n| macOS  | iOS |\n| ------------- | ------------- |\n| \u003cimg width=\"371\" alt=\"macOS\" src=\"https://github.com/user-attachments/assets/34cd8742-a98b-4616-9388-bd6afac550e9\" /\u003e | \u003cimg width=\"354\" alt=\"iOS\" src=\"https://github.com/user-attachments/assets/ceac4cb0-b9ab-4fe8-823c-45729859155c\" /\u003e |\n\n`CircularGridDemo`\n| macOS  | iOS |\n| ------------- | ------------- |\n| \u003cimg width=\"371\" alt=\"macOS\" src=\"https://github.com/user-attachments/assets/8def037d-6d7b-4343-9d96-be4867249fdc\" /\u003e | \u003cimg width=\"379\" alt=\"iOS\" src=\"https://github.com/user-attachments/assets/9940d142-0c68-4282-ab75-f054c26e99fa\" /\u003e |\n\n`SystemDemo`\n| macOS  | iOS |\n| ------------- | ------------- |\n| \u003cimg width=\"394\" alt=\"macOS\" src=\"https://github.com/user-attachments/assets/ae6cc1fb-ae52-4ba9-b238-3d5e88345b38\" /\u003e | \u003cimg width=\"387\" alt=\"iOS\" src=\"https://github.com/user-attachments/assets/7bea24f0-c043-4c20-8714-6500b1862e0c\" /\u003e |\n\n**visionOS**\n\u003cimg width=\"950\" alt=\"visionOS\" src=\"https://github.com/user-attachments/assets/7a42e4f8-b739-4b98-ba8c-1266884e1131\" /\u003e\n\n`WatchOSDemo`\n| Horizontal  | Vertical | Grid | Circular Grid |\n| ------------- | ------------- | ------------- | ------------- |\n| \u003cimg width=\"274\" alt=\"WatchOSDemo\" src=\"https://github.com/user-attachments/assets/9c85510c-47ac-401b-8fc6-d1c6508c2693\" /\u003e | \u003cimg width=\"272\" alt=\"WatchOSDemo\" src=\"https://github.com/user-attachments/assets/370afdce-6944-4db3-b681-e28f811719e0\" /\u003e | \u003cimg width=\"270\" alt=\"WatchOSDemo\" src=\"https://github.com/user-attachments/assets/eb0bbe15-a99a-4e9c-951e-7caa39ebd1b1\" /\u003e | \u003cimg width=\"269\" alt=\"WatchOSDemo\" src=\"https://github.com/user-attachments/assets/ec29ecbb-159c-43b5-96dd-3b115b73fd61\" /\u003e |\n\n## Version 1.0 (deprecated)\n\nVersion 1.0 is deprecated and no longer supported. You can find the documentation for version 1.0 in the file: [README v1](https://github.com/buh/CompactSlider/blob/main/README_v1.md).\n\n# Support\n\nYou can buy me a coffee [here](https://www.buymeacoffee.com/bukhtin) ☕️\n\n# License\n\n`CompactSlider` is available under the [MIT license](https://github.com/buh/CompactSlider/blob/main/LICENSE)\n\n\n","funding_links":["https://www.buymeacoffee.com/bukhtin","https://paypal.me/bukhtin"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuh%2Fcompactslider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuh%2Fcompactslider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuh%2Fcompactslider/lists"}