{"id":20664722,"url":"https://github.com/jasudev/axissegmentedview","last_synced_at":"2025-08-21T13:32:45.807Z","repository":{"id":41474541,"uuid":"474428497","full_name":"jasudev/AxisSegmentedView","owner":"jasudev","description":"A library that allows you to easily create various styles of segmented views. Supports iOS, macOS and tvOS.","archived":false,"fork":false,"pushed_at":"2022-10-27T04:53:26.000Z","size":1243,"stargazers_count":179,"open_issues_count":2,"forks_count":16,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-12T06:55:07.108Z","etag":null,"topics":["ios","macos","segment","segment-tree","segmentation","segmented","segmented-controls","segmented-view","segmentedcontrol","segmentedview","segments","swift","swiftui","tabbar","tabview","tvos","tvos-framework","tvos-library"],"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/jasudev.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":"2022-03-26T18:07:47.000Z","updated_at":"2024-08-16T08:30:12.000Z","dependencies_parsed_at":"2023-01-20T01:32:50.821Z","dependency_job_id":null,"html_url":"https://github.com/jasudev/AxisSegmentedView","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasudev%2FAxisSegmentedView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasudev%2FAxisSegmentedView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasudev%2FAxisSegmentedView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasudev%2FAxisSegmentedView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jasudev","download_url":"https://codeload.github.com/jasudev/AxisSegmentedView/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230516183,"owners_count":18238352,"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":["ios","macos","segment","segment-tree","segmentation","segmented","segmented-controls","segmented-view","segmentedcontrol","segmentedview","segments","swift","swiftui","tabbar","tabview","tvos","tvos-framework","tvos-library"],"created_at":"2024-11-16T19:25:54.745Z","updated_at":"2024-12-20T00:08:34.750Z","avatar_url":"https://github.com/jasudev.png","language":"Swift","readme":"# **AxisSegmentedView for SwiftUI**\nA library that allows you to easily create various styles of segmented views. Supports iOS, macOS and tvOS.\n\n[![Platforms](https://img.shields.io/badge/Platforms-iOS%20%7C%20macOS-blue?style=flat-square)](https://developer.apple.com/macOS)\n[![iOS](https://img.shields.io/badge/iOS-14.0-blue.svg)](https://developer.apple.com/iOS)\n[![macOS](https://img.shields.io/badge/macOS-11.0-blue.svg)](https://developer.apple.com/macOS)\n[![tvOS](https://img.shields.io/badge/tvOS-14.0-blue.svg)](https://developer.apple.com/tvOS)\n[![instagram](https://img.shields.io/badge/instagram-@dev.fabula-orange.svg?style=flat-square)](https://www.instagram.com/dev.fabula)\n[![SPM](https://img.shields.io/badge/SPM-compatible-red?style=flat-square)](https://developer.apple.com/documentation/swift_packages/package/)\n[![MIT](https://img.shields.io/badge/licenses-MIT-red.svg)](https://opensource.org/licenses/MIT)  \n\n## Screenshot\n|Horizontal|Vertical|For use without style|\n|:---:|:---:|:---:|\n|\u003cimg src=\"Markdown/AxisSegmentedView1.png\"\u003e|\u003cimg src=\"Markdown/AxisSegmentedView2.png\"\u003e|\u003cimg src=\"Markdown/AxisSegmentedView3.png\"\u003e|\n\n\nhttps://user-images.githubusercontent.com/1617304/160249891-a2fe15f2-5b07-4c2c-a204-fa9bd8981989.mov\n\n\n## Example\n[https://fabulaapp.page.link/234](https://fabulaapp.page.link/234)\n\n## Usages\n```swift\nAxisSegmentedView(selection: $selection, constant: .init()) {\n    Image(systemName: \"align.horizontal.left\")\n        .itemTag(0, selectArea: 0) {\n            Image(systemName: \"align.horizontal.left.fill\")\n        }\n    Image(systemName: \"align.horizontal.right\")\n        .itemTag(1, selectArea: 160) {\n            Image(systemName: \"align.horizontal.right.fill\")\n        }\n    Image(systemName: \"align.vertical.top\")\n        .itemTag(2, selectArea: 0) {\n            Image(systemName: \"align.vertical.top.fill\")\n        }\n    Image(systemName: \"align.vertical.bottom\")\n        .itemTag(3, selectArea: 160) {\n            Image(systemName: \"align.vertical.bottom.fill\")\n        }\n} style: {\n    ASBasicStyle()\n} onTapReceive: { selectionTap in\n    /// Imperative syntax\n    print(\"---------------------\")\n    print(\"Selection : \", selectionTap)\n    print(\"Already selected : \", self.selection == selectionTap)\n}\n.frame(height: 44)\n```\n\n## Usages - For use without style\n```swift\nvar listView: some View {\n    List(0...100, id: \\.self) { index in\n        Button {\n            print(\"click\")\n        } label: {\n            Text(\"Index \\(index)\")\n        }\n    }.listStyle(.plain)\n}\n    \nAxisSegmentedView(selection: $selection, constant: .init()) {\n    Rectangle()\n        .overlay(\n            Text(\"0\")\n        )\n        .itemTag(0, selectArea: maxArea1) {\n            Rectangle()\n                .overlay(\n                    Text(\"0\")\n                )\n        }\n    Rectangle()\n        .overlay(\n            Text(\"1\")\n        )\n        .itemTag(1, selectArea: maxArea1) {\n            listView\n        }\n    Rectangle()\n        .overlay(\n            Text(\"2\")\n        )\n        .itemTag(2, selectArea: maxArea1) {\n            listView\n        }\n    Rectangle()\n        .overlay(\n            Text(\"3\")\n        )\n        .itemTag(3, selectArea: maxArea1) {\n            listView\n        }\n}\n```\n  \n## Swift Package Manager\nThe Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. Once you have your Swift package set up, adding AxisSegmentedView as a dependency is as easy as adding it to the dependencies value of your Package.swift.\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/jasudev/AxisSegmentedView.git\", .branch(\"main\"))\n]\n```\n\n## Contact\ninstagram : [@dev.fabula](https://www.instagram.com/dev.fabula)  \nemail : [dev.fabula@gmail.com](mailto:dev.fabula@gmail.com)\n\n## License\nAxisSegmentedView is available under the MIT license. See the [LICENSE](LICENSE) file for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasudev%2Faxissegmentedview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjasudev%2Faxissegmentedview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasudev%2Faxissegmentedview/lists"}