{"id":18473411,"url":"https://github.com/0xopenbytes/openbytesnavigation","last_synced_at":"2026-04-18T00:01:56.140Z","repository":{"id":130053403,"uuid":"611031079","full_name":"0xOpenBytes/OpenBytesNavigation","owner":"0xOpenBytes","description":"📚 Easy-to-use navigation system for SwiftUI apps","archived":false,"fork":false,"pushed_at":"2023-03-11T21:24:16.000Z","size":15,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-27T13:50:19.257Z","etag":null,"topics":["alert","ios","macos","modal","navigation","navigationpath","navigationstack","swift","swiftui","toast","tvos","watchos"],"latest_commit_sha":null,"homepage":"https://0xopenbytes.github.io/OpenBytesNavigation/","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/0xOpenBytes.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":"2023-03-08T00:47:43.000Z","updated_at":"2023-03-08T13:21:59.000Z","dependencies_parsed_at":"2023-04-12T07:17:24.469Z","dependency_job_id":null,"html_url":"https://github.com/0xOpenBytes/OpenBytesNavigation","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/0xOpenBytes/OpenBytesNavigation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xOpenBytes%2FOpenBytesNavigation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xOpenBytes%2FOpenBytesNavigation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xOpenBytes%2FOpenBytesNavigation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xOpenBytes%2FOpenBytesNavigation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xOpenBytes","download_url":"https://codeload.github.com/0xOpenBytes/OpenBytesNavigation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xOpenBytes%2FOpenBytesNavigation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31950891,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["alert","ios","macos","modal","navigation","navigationpath","navigationstack","swift","swiftui","toast","tvos","watchos"],"created_at":"2024-11-06T10:24:46.213Z","updated_at":"2026-04-18T00:01:56.064Z","avatar_url":"https://github.com/0xOpenBytes.png","language":"Swift","readme":"# OpenBytesNavigation\n\nOpenBytesNavigation is a SwiftUI library that provides a flexible and easy-to-use navigation system for your SwiftUI apps. It allows you to navigate between views, show modal views, display alerts and action sheets, and show toast notifications.\n\n## Usage\n\nTo use OpenBytesNavigation, you need to create an instance of `OpenBytesNavigationPath`, which keeps track of the navigation state. You can then use the `OpenBytesNavigationView` view to display your content and provide navigation functionality.\n\n```swift\nimport OpenBytesNavigation\nimport SwiftUI\n\nstruct ContentView: View {\n    @ObservedObject private var path = OpenBytesNavigationPath(id: \"path_id\")\n\n    var body: some View {\n        OpenBytesNavigationView(path: path) {\n            // your content here\n        }\n    }\n}\n```\n\n## Navigation Examples\n\n### SwiftUI Previews\n\nCall the `preview` function on `OpenBytesNavigationView` to create a preview of your navigation stack. This is useful for SwiftUI previews as the path won't be able to save.\n\n```swift\nstruct ExampleView_Previews: PreviewProvider {\n    static var previews: some View {\n        OpenBytesNavigationView.preview {\n            // your content here\n        }\n    }\n}\n```\n\n### Action Sheet\n\n```swift\npath.actionSheet(\n    title: \"Delete Item?\",\n    actions: {\n        Button(\"Delete\", role: .destructive) {\n            // Delete item\n        }\n    },\n    message: {\n        Text(\"Are you sure you want to delete this item?\")\n    }\n)\n```\n\n### Alert\n\n```swift\npath.alert(\n    title: Text(\"Error\"),\n    message: Text(\"An error occurred. Please try again.\"),\n    primaryButton: .default(Text(\"OK\")),\n    secondaryButton: .cancel()\n)\n```\n\n### Modal\n\n```swift\npath.modal(\n    body: {\n        Text(\"Modal body\")\n    }\n)\n```\n\n### Toast\n\n```swift\npath.toast(\n    title: \"Success\",\n    message: \"Item saved successfully\",\n    style: .success\n)\n```\n\n### Push\n\n```swift\n.navigationDestination(for: Date.self, destination: { DateView(date: $0) })\n...\npath.push(Date())\n```\n\n### Pop\n\n```swift\npath.pop()\n```\n\n### Save and Load\n\n```swift\nlet id = \"test\"\nlet path = OpenBytesNavigationPath(id: id, isPreview: false)\n\nXCTAssertEqual(path.navigation.count, 0)\n\npath.push(\"Value\")\n\nXCTAssertEqual(path.navigation.count, 1)\n\npath.save()\n\nlet loadedPath = OpenBytesNavigationPath.load(id: id)\n\nXCTAssertEqual(loadedPath.navigation.count, path.navigation.count)\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xopenbytes%2Fopenbytesnavigation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xopenbytes%2Fopenbytesnavigation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xopenbytes%2Fopenbytesnavigation/lists"}