Navigating between screens in your app should be easy, right? However, creating robust, scalable, and delightful navigation can be a challenge. Jetpack Navigation has been a key tool for developers for years, but with the evolution of Android UIs, particularly with the introduction of Jetpack Compose, Google realized a new approach was needed.
Today, the company announced Jetpack Navigation 3, a new navigation library built from the ground up specifically for Compose. Called Nav3 for short, it uses Compose’s declarative programming model and state as its fundamental building blocks.
Jetpack Navigation 3 focuses on making navigation predictable, modular, and flexible for modern Android applications. It acknowledges the limitations of the previous navigation approach and builds something that better supports the complexity of today’s apps.
Why a New Navigation Library?
The original Jetpack Navigation library (sometimes called Nav2, as it’s in its second major version) was introduced in 2018—before AndroidX and before the existence of Jetpack Compose. While it served its original purpose well, it started to show limitations as modern development patterns emerged.
One major limitation was the handling of the backstack. In Nav2, backstack state could only be observed indirectly. This created potential for two separate sources of truth, increasing the likelihood of inconsistent application state. Another issue was related to layout: Nav2’s NavHost
was only capable of displaying one destination at a time—the topmost one in the back stack—and occupying all available screen space. This made it difficult to implement layouts with more than one content pane, like the list-detail patterns commonly used on tablets or foldable devices.
Developers had to find workarounds, often introducing extra layers of complexity just to accommodate responsive UI or shared navigation state. As a result, it became clear that Compose needed a purpose-built navigation system—one that fully embraced its reactive model.
A Navigation Model You Control
Jetpack Navigation 3 is built on a new set of guiding principles. Rather than hiding navigation details behind a black box, Nav3 gives developers full control while providing helpful defaults.
You own the stack: With Nav3, the developer—not the library—owns and controls the navigation stack. The stack is a simple list, specifically a SnapshotStateList<T>
, where T
can be any type that represents your navigation route. You can modify this list by adding or removing elements, and because it’s backed by Compose state, all changes are immediately reflected in the UI. This means you have a single, observable source of truth for navigation state.
Out of your way: Developers often dislike libraries that hide too much. Nav3 avoids this by staying out of your way. It provides open, extensible building blocks that you can use—or override—to suit your specific needs. If you want custom navigation behavior, you can implement it directly. This flexibility lets you design navigation that matches your app’s architecture.
Choose your building blocks: Rather than enforcing a one-size-fits-all pattern, Nav3 offers small, composable components. You can combine these to create the navigation behavior you want. Google is also providing a cookbook of examples that demonstrate how to assemble these components for common scenarios. Whether you’re building a bottom navigation bar, a list-detail layout, or something more complex, you can start from these examples and customize as needed.
This approach also encourages you to think about navigation as part of your UI state. It integrates smoothly with other Compose features like remember
, mutableStateListOf
, and LaunchedEffect
, allowing you to create flows that feel natural and reactive.
Key Features and Practical Examples
Jetpack Navigation 3 introduces several key features that reflect the needs of modern Compose applications. These include better animation support, more responsive layouts, and improved modularity. Below are some of the core capabilities developers can expect.
Animations: Nav3 includes built-in transition animations for screen changes, including support for predictive back gestures. If you need finer control, you can use a flexible animation API to customize transitions at both the global and individual screen levels. This makes your app feel fluid while also giving you full control.
Responsive Layouts: The new layout system, called Scenes, lets you display multiple destinations at once. This supports adaptive layouts such as a list on the left and details on the right—perfect for tablets or landscape views. It helps you bridge the gap between small and large screens without duplicating logic.
State Separation: State management is cleaner in Nav3. It supports distributing state across backstack destinations. There’s even additional ViewModel
support through a dedicated lifecycle-aware library. This separation means each screen can manage its own state independently, reducing bugs and improving clarity.
Modularity: Nav3 supports splitting your navigation code across multiple modules. This improves build performance and supports separation of concerns. Each feature module can define its own navigation logic, helping you maintain cleaner project structure as your app scales.
These features are intended to solve long-standing pain points without introducing unnecessary overhead. Developers can still build simple apps easily, but when complexity increases, Nav3 scales with you.
Getting Started and What’s Next
To start using Nav3, visit the official developer documentation. Google has also published an open-source examples repository that includes recipes for common navigation patterns.
Nav3 is currently in alpha, and while the API may evolve based on feedback, it’s ready for experimentation. Google encourages developers to try it out and provide input on what works and what doesn’t. If you’re building a Compose-first app, Nav3 offers a solid foundation.
We’ll keep you updated as more integrations become available and the library matures. As Jetpack Navigation 3 moves through its development stages, expect enhancements in tooling, more guidance in the form of best practices, and expanded support for advanced use cases.
For now, whether you’re building your first Compose app or migrating from Nav2, Nav3 aims to make the process smoother and more flexible. It’s built around your needs, not the other way around.