{"id":18616521,"url":"https://github.com/davidask/headlesstabview","last_synced_at":"2025-10-11T14:37:12.587Z","repository":{"id":63907691,"uuid":"528153389","full_name":"davidask/HeadlessTabView","owner":"davidask","description":"TabView alternative, no tab bar included","archived":false,"fork":false,"pushed_at":"2022-09-02T07:17:07.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-29T18:47:36.547Z","etag":null,"topics":[],"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/davidask.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-23T20:32:13.000Z","updated_at":"2024-12-10T20:04:08.000Z","dependencies_parsed_at":"2022-11-28T22:47:37.910Z","dependency_job_id":null,"html_url":"https://github.com/davidask/HeadlessTabView","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/davidask/HeadlessTabView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidask%2FHeadlessTabView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidask%2FHeadlessTabView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidask%2FHeadlessTabView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidask%2FHeadlessTabView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidask","download_url":"https://codeload.github.com/davidask/HeadlessTabView/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidask%2FHeadlessTabView/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007452,"owners_count":26084313,"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-10-11T02:00:06.511Z","response_time":55,"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":[],"created_at":"2024-11-07T03:35:33.615Z","updated_at":"2025-10-11T14:37:12.559Z","avatar_url":"https://github.com/davidask.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HeadlessTabView\n\nMinimal SwiftUI library providing a simple `TabView` alternative without the compulsory tab bar, or the subtle headaches of using conditional rendering.\n\n## Overview\n\nThis project was sprung from the need to conditionally switch between views meeting the following criteria:\n\n1. Preserve internal state of conditional views to enable \"multitasking\" within applications\n2. Cleanly detach conditional views from the view hierarchy, triggering appearance notifications like `.onAppear` and `.onDisappear`\n3. Allow for a custom (or hidden) method of switching tabs\n\n| Solution                               | Persists state | Appearance notifications | No extras |\n| -------------------------------------- | -------------- | ------------------------ | --------- |\n| Use `TabView`                          | ✅             | ✅                       | ❌        |\n| Use conditional rendering              | ❌             | ✅                       | ✅        |\n| Use `ZStack` with `.opacity` modifiers | ✅             | ❌                       | ✅        |\n| Use `HeadlessTabView`                  | ✅             | ✅                       | ✅        |\n\n**In summary, this library allows you to create truly unique tab bar experiences without hacks or compromising performance.**\n\n## Requirements\n\n- iOS 13.0+\n- tvOS 13.0+\n\n## Usage\n\n```swift\nimport HeadlessTabView\n\n// Declare a `Hashable \u0026 CaseIterable` type\nenum Selection: String, Hashable, CaseIterable {\n    case first\n    case second\n}\n\nstruct Content: View {\n\n    @State var selection: Selection = .first\n\n    var body: some View {\n        HeadlessTabView($selection) { selection in\n          // NOTE: This @ViewBuilder block is returned in its\n          // entirety, meaning that if each view needs e.g. a `NavigationView`,\n          // it's workable to wrap the entire switch statement in one.\n          switch(selection) {\n              case .first:\n                // First view\n              case .second:\n                // Second view\n            }\n        }\n    }\n}\n\n```\n\n## Contribute\n\nPlease feel welcome contributing to **HeadlessTabView**, check the `LICENSE` file for more info.\n\n## Credits\n\nDavid Ask\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidask%2Fheadlesstabview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidask%2Fheadlesstabview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidask%2Fheadlesstabview/lists"}