{"id":20093753,"url":"https://github.com/lbrndnr/stacknavigationview","last_synced_at":"2026-02-18T13:01:54.280Z","repository":{"id":50742211,"uuid":"326177361","full_name":"lbrndnr/StackNavigationView","owner":"lbrndnr","description":"A SwiftUI component for macOS that makes complex view hierarchies possible","archived":false,"fork":false,"pushed_at":"2023-08-04T09:52:25.000Z","size":576,"stargazers_count":111,"open_issues_count":2,"forks_count":10,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-06T04:41:05.830Z","etag":null,"topics":["macos","swiftui"],"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/lbrndnr.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-02T12:24:03.000Z","updated_at":"2025-01-01T15:01:58.000Z","dependencies_parsed_at":"2024-11-13T16:48:24.127Z","dependency_job_id":"558f54e4-5d60-40e9-b918-8f20628ef2ca","html_url":"https://github.com/lbrndnr/StackNavigationView","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lbrndnr/StackNavigationView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbrndnr%2FStackNavigationView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbrndnr%2FStackNavigationView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbrndnr%2FStackNavigationView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbrndnr%2FStackNavigationView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lbrndnr","download_url":"https://codeload.github.com/lbrndnr/StackNavigationView/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbrndnr%2FStackNavigationView/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29580638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T08:38:15.585Z","status":"ssl_error","status_checked_at":"2026-02-18T08:38:14.917Z","response_time":162,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["macos","swiftui"],"created_at":"2024-11-13T16:48:19.280Z","updated_at":"2026-02-18T13:01:54.266Z","avatar_url":"https://github.com/lbrndnr.png","language":"Swift","readme":"# StackNavigationView\n\n[![Twitter: @lbrndnr](https://img.shields.io/badge/contact-@lbrndnr-blue.svg?style=flat)](https://twitter.com/lbrndnr)\n[![License](http://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/lbrndnr/StackNavigationView/blob/master/LICENSE)\n\n⚠️ SwiftUI now supports [NavigationStack](https://developer.apple.com/documentation/swiftui/navigationstack), making this repo redundant for new projects. I recommend to only use this if you have to support macOS 11 or 12. ⚠️\n\n## About\nAs of SwiftUI v2, `NavigationView` only supports a simple sidebar selection. This makes it impossible to push new views onto the view hierarchy, as one could do e.g. with `UINavigationController`. This project is a workaround that builds upon `NavigationView` to support complex view hierarchies.\n\n![Demo](https://raw.githubusercontent.com/lbrndnr/StackNavigationView/master/demo.gif)\n\n## Usage\nThe interface of `StackNavigationView` is very similar to the one of `NavigationView`, just make sure not to use `NavigationLink` inside of `StackNavigationView` though, it will result in undefined behaviour. You'll find the full example [here](https://github.com/lbrndnr/StackNavigationView/tree/master/Example/Example). \n\n```swift\nstruct ContentView: View {\n\n@State private var selection: Int? = 0\n\nvar body: some View {\n    \n    return StackNavigationView(selection: $selection) {\n        List {\n            SidebarNavigationLink(\"Apples\", destination: rootView(title: \"Apples\"), tag: 0, selection: $selection)\n            SidebarNavigationLink(\"Bananas\", destination: rootView(title: \"Bananas\"), tag: 1, selection: $selection)\n            SidebarNavigationLink(\"Clementines\", destination: rootView(title: \"Clementines\"), tag: 2, selection: $selection)\n        }\n        Text(\"Empty Selection\")\n    }\n    .frame(minWidth: 600, minHeight: 400)\n}\n\n@ViewBuilder private func rootView(title: String) -\u003e some View {\n    VStack {\n        Text(\"This is the root view of \\(title)\")\n            .font(.system(size: 50))\n            .bold()\n        Spacer()\n            .frame(height: 40)\n        StackNavigationLink(\"Next\", destination: ChildView(sidebar: title, level: 1))\n    }\n    .padding(20)\n    .navigationTitle(title)\n}\n}\n```\n\n## Requirements\n`StackNavigationView` is a SwiftUI component for macOS. macOS Big Sur is required.\n\n## Author\nI'm Laurin Brandner, I'm on [Twitter](https://twitter.com/lbrndnr).\n\n## License\n`StackNavigationView` is licensed under the [MIT License](http://opensource.org/licenses/mit-license.php).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flbrndnr%2Fstacknavigationview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flbrndnr%2Fstacknavigationview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flbrndnr%2Fstacknavigationview/lists"}