swiftui-navigation-navigator

Unify SwiftUI push, sheet, and deep-link flows with destination-driven navigation.

535|40|Updated Nov 19, 2024
One-click install
npx skills add https://github.com/hmlongco/Navigator --skill swiftui-navigation-navigator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swiftui-navigation-navigator
Source: https://github.com/hmlongco/Navigator/tree/main
Command: npx skills add https://github.com/hmlongco/Navigator --skill swiftui-navigation-navigator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

SwiftUI navigation can become complex when using modular destinations, deep linking, and checkpoints. Navigator provides a destination-driven model that unifies push, sheet, and presentation flows across modules and avoids per-type navigation registrations.

Core Features & Use Cases

  • Destination-driven navigation using NavigationDestination enums with a single internal registration.
  • ManagedNavigationStack that injects a Navigator into the environment for centralized control.
  • NavigationLink(to: Destination.case) usage to simplify navigation without per-type registrations.
  • Deep linking and in-app routing via navigation send / onNavigationReceive and checkpoint-based navigation.
  • Modular provisioning via NavigationProvidedDestination and onNavigationProvidedView for cross-module apps.
  • Dismissible views and cross-stack coordination with built-in support for sheets, covers, and nested navigators.

Quick Start

Wrap your root view in a ManagedNavigationStack and use NavigationLink(to: Destination.case) to drive navigation.

Frequently Asked Questions about swiftui-navigation-navigator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage SwiftUI navigation across multiple modules without per-type registrations?

SwiftUI navigation across modules uses a destination-driven model with NavigationDestination enums and a single internal registration. You conform destination enums to NavigationDestination and use NavigationLink(to: Destination.case) to avoid per-type navigation registrations.

How does deep linking work with SwiftUI NavigationStack?

Deep linking in SwiftUI uses a Navigator injected via ManagedNavigationStack to handle routing. It processes in-app routing through navigation send and onNavigationReceive, enabling checkpoint-based navigation flows across your app.

Can I unify push, sheet, and full-screen cover navigation flows in SwiftUI?

Yes, unifying push, sheet, and full-screen cover flows is possible using a Navigator-driven model. It provides centralized control for dismissible views and cross-stack coordination with built-in support for nested navigators.

What is the best way to handle cross-module destination provisioning in SwiftUI?

Cross-module destination provisioning in SwiftUI is handled via NavigationProvidedDestination and onNavigationProvidedView. This allows modular apps to combine and present destinations from multiple separate modules dynamically.

How do I set up a centralized Navigator for SwiftUI navigation?

To set up centralized SwiftUI navigation, wrap your root view in a ManagedNavigationStack. This injects a Navigator into the environment, allowing you to use NavigationLink(to: Destination.case) to drive all navigation flows.