AwesomeNavigation is a lightweight and elegant SwiftUI navigation library designed to make routing in iOS/macOS apps simple, declarative, and centralized — all while retaining native SwiftUI performance and flexibility.
- 🚦 Centralized Navigation Management using a shared singleton or injectable instance.
- 🛝 Type-safe Route Definition using the
ANRouteprotocol. - ↺ Push, Pop, PushReplacement, PopToRoot — all made easy.
- 🔧 Configurable Root and Transitions via
ANConfig. - 💡 Declarative API that fits naturally into SwiftUI’s ecosystem.
- ⚡ Swift Package ready for seamless integration.
Use Swift Package Manager:
-
Open your project.
-
Go to File > Add Packages…
-
Enter the repository URL:
https://github.com/k-arindam/AwesomeNavigation.git -
Add the package and import it where needed:
import AwesomeNavigation
You can use the provided navigation methods from any view using @EnvironmentObject.
A shared or injectable navigation controller that holds and manipulates the NavigationPath.
Protocol to define your route types. Conforming types must be Hashable, Codable, and Sendable.
Configuration for your application including:
- Initial route
- Animation style
- Route-to-View builder closure
Entry-point View that wraps NavigationStack and injects navigation environment.
Here are a few exciting features planned for upcoming releases:
- 🥪 Unit-testable navigation by allowing injection of
AwesomeNavigation(non-singleton mode) - 🔍 Deep linking support via pre-filled
NavigationPath - 🧱 Scoped navigation contexts (multiple stacks in one app)
- 🛡️ Interception hooks (e.g.,
onRouteWillPush, auth guards, analytics) - 🧑💻 DevTools-style route inspector/debug overlay
- 📱 iPad/macOS optimized UI state sync (split views, multiple windows)
Pull requests are welcome! Feel free to open issues for bug reports or feature suggestions.
Inspired by:
- SwiftUI's native navigation stack
- Navigator paradigms from Flutter and React Router
A demo implementation is included in the Example/ folder.
@main
struct AwesomeNavigationExampleApp: App {
...
}Banner image created by Canva AI



