{"id":21376497,"url":"https://github.com/fluidgroup/swiftui-stack","last_synced_at":"2025-07-18T17:31:27.206Z","repository":{"id":164453577,"uuid":"637403259","full_name":"FluidGroup/swiftui-stack","owner":"FluidGroup","description":"Yet another Navigation Stack + Transition","archived":false,"fork":false,"pushed_at":"2025-06-09T05:44:57.000Z","size":10709,"stargazers_count":87,"open_issues_count":0,"forks_count":8,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-13T01:07:26.010Z","etag":null,"topics":["swiftui"],"latest_commit_sha":null,"homepage":"https://fluidgroup.github.io/swiftui-stack/documentation/swiftuistack/","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FluidGroup.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,"zenodo":null}},"created_at":"2023-05-07T13:03:31.000Z","updated_at":"2025-07-09T09:37:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"aa3b47ef-9a51-4579-9362-c7f62da7f457","html_url":"https://github.com/FluidGroup/swiftui-stack","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/FluidGroup/swiftui-stack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2Fswiftui-stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2Fswiftui-stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2Fswiftui-stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2Fswiftui-stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FluidGroup","download_url":"https://codeload.github.com/FluidGroup/swiftui-stack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2Fswiftui-stack/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265128187,"owners_count":23715621,"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":["swiftui"],"created_at":"2024-11-22T09:15:57.185Z","updated_at":"2025-07-13T10:31:04.776Z","avatar_url":"https://github.com/FluidGroup.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n![stack](https://github.com/FluidGroup/swiftui-stack/assets/1888355/58a5ee2f-c44b-4aa1-8254-34a2b59cda1b)\n\nCustom Stack Navigation for SwiftUI\n---\nThis library provides a custom container view for SwiftUI that offers an alternative to the standard NavigationStack. It aims to improve the customizability of transitions during screen navigation by moving away from the behaviors of UINavigationController and UINavigationBar.\n\nFeatures\n---\n- Customizable transitions during screen navigation\n- Contextual animations similar to iOS home screen app icons and app screens\n- Familiar API to NavigationView and NavigationStack for ease of use\n- Path support for restoring previously navigated views\n\nGetting Started\n---\nTo use this library, you'll need to work with three main symbols: Stack, StackLink, and StackUnwindLink.\n\nExample Usage\n---\n1. Import the SwiftUIStack module in your SwiftUI view file:\n\n```swift\nimport SwiftUIStack\n```\n\n2. Use the Stack container in your view hierarchy:\n\n```swift\nvar body: some View {\n  Stack {\n    // Your views here...\n  }\n}\n```\n\n3. Create navigation links using StackLink with your desired transition and destination:\n\n```swift\nStackLink(transition: .slide, value: someValue) {\n  Text(\"Navigate to detail view\")\n}\n```\n\nYou can also set the matched transition in the transition parameter using a unique identifier and a namespace:\n\n```swift\nStackLink(transition: .matched(identifier: user.id, in: local), value: someValue) {\n  Text(\"Navigate to detail view with matched transition\")\n}\n```\n\n4. Optionally, use StackUnwindLink to create a navigation link back to the previous view:\n\n```swift\nStackUnwindLink {\n  Text(\"Back to previous view\")\n}\n```\n\nUnwind Context\n---\nIn stacked views, you can access the unwindContext as an EnvironmentValue. You can pass the unwindContext to a StackUnwindLink. This allows you to explicitly specify the stack that triggers the unwind.\n\n```swift\n@Environment(\\.stackUnwindContext) var unwindContext\n\nStackUnwindLink(target: .specific(unwindContext)) {\n  Text(\"Back to Menu\")\n}\n```\n\nStackUnwindLink Modes\n---\nStackUnwindLink now supports different modes for navigation. To navigate back to the root of the target stack, use the .all mode.\n\n```swift\nStackUnwindLink(mode: .all) {\n  Text(\"Back to Root\")\n}\n```\n\nNested Stacks\n---\nThis technique is useful for nested stacks when you need to send a message across multiple levels of the hierarchy. By using the unwindContext in conjunction with StackUnwindLink, you can effectively communicate between nested stacks and navigate through different levels of the view hierarchy.\n\nInstallation\n---\nThis library currently only supports installation via Swift Package Manager.\n\nTo add the package to your project, you can manually add it to your Package.swift file:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/FluidGroup/swiftui-stack.git\", from: \"1.0.0\")\n]\n```\n\nContributing\n---\n(Include instructions for contributing to the project, such as opening issues, submitting pull requests, and any other relevant information)\n\nLicense\n---\nThis project is licensed under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluidgroup%2Fswiftui-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffluidgroup%2Fswiftui-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluidgroup%2Fswiftui-stack/lists"}