Navi – Lightweight type-safe navigation for SwiftUI (built on NavigationStack)

Hey everyone,

I’d like to share Navi, a small pure-Swift 6 package that makes working with NavigationStack cleaner and safer — without forcing any particular architecture on your app.

The problem it solves

NavigationStack is a big improvement over the old NavigationView days, but once you need:

  • multi-step deep links
  • reliable “pop to a specific screen”
  • type-safe routes that don’t break when someone inserts a screen in the middle of a flow

…you often end up writing brittle path surgery (path.removeLast(3)) or adopting a heavy routing framework.

Navi sits in the sweet spot: a thin, typed layer on top of Apple’s native NavigationStack. No custom stack, no UIKit bridges, no architecture lock-in.

Key features

Need Native NavigationStack Navi
Type-safe routes Easy to lose with NavigationPath Enum + macro, compile-time checked
Programmatic navigation Pass bindings / mutate path manually push(to:) / pop()
Deep linking Manual path construction deepLink(to:)
Pop to a specific screen Manual path surgery @OriginKey + pop(to:)

Links

Would love any feedback — especially if you’ve tried other navigation helpers or have ideas for improvements.

1 Like

Just published an article about how we structure navigation in our SwiftUI apps using the Coordinator pattern together with Navi.

The main goals were:

• Keep navigation decisions out of views

• Make entire flows reusable

• Support independent NavigationStacks per tab

• Handle asynchronous cross-tab deep links cleanly

We walk through the architecture, show how parent coordinators decide what “finish” means for child flows, and how deep links reuse the same navigation graph.

Article:

https://medium.com/@davidpallatx/how-we-build-flexible-swiftui-navigation-with-coordinators-36bd5efd4e98

Would love to hear your thoughts or how you’re handling similar navigation challenges.