navigation-3

Migrate Android apps from Navigation 2 to Jetpack Navigation 3 and implement Compose navigation patterns.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/RavitejaKarra24/dotfiles --skill navigation-3-ravitejakarra24
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: navigation-3
Source: https://github.com/RavitejaKarra24/dotfiles/tree/main/pi/.pi/agent/skills/navigation-3
Command: npx skills add https://github.com/RavitejaKarra24/dotfiles --skill navigation-3-ravitejakarra24

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Migrating an Android app from Jetpack Navigation 2 to Navigation 3 involves many coordinated changes—dependencies, NavKey routes, back stack state holders, entryProvider DSL, and NavDisplay—and developers also need working patterns for dialogs, bottom sheets, deep links, and multiple back stacks. ## Core Features & Use Cases - Step-by-step migration guide: Replace NavController and NavHost with NavigationState, Navigator, entryProvider, and NavDisplay, including dependency and SDK updates. - Recipe library: Ready-to-adapt code for dialogs, bottom sheets, list-detail and two-pane scenes, Material 3 adaptive layouts, animations, conditional (login-gated) navigation, deep links, and returning results. - Architecture integration: Patterns for Hilt/Koin modularized navigation, ViewModel argument passing, and type-safe routes with Kotlin serialization. - Use Case: An Android developer with a Compose app using string-based routes can first migrate to type-safe destinations, then follow the guide to move all destinations into an entryProvider and render them with NavDisplay. ## Quick Start Migrate my Android project from Navigation 2 to Navigation 3 using the official migration guide and recipes.

Frequently Asked Questions about navigation-3

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

FAQPage Schema
How do I migrate from Navigation 2 to Navigation 3 in Android?

Add the navigation3-runtime and navigation3-ui dependencies, make routes implement NavKey, create NavigationState and Navigator classes, move destinations from NavHost into an entryProvider, replace NavHost with NavDisplay, then remove Navigation 2 dependencies.

How do I show a dialog or bottom sheet destination in Navigation 3?

Add DialogSceneStrategy or a custom BottomSheetSceneStrategy to NavDisplay's sceneStrategies parameter, then mark the destination's entry with DialogSceneStrategy.dialog() or BottomSheetSceneStrategy.bottomSheet() metadata.

Does Navigation 3 support Fragments and Views?

Navigation 3 is designed exclusively for Jetpack Compose, so destinations must be composable functions. To keep existing Fragments or Views, use Compose interoperability APIs to embed them inside composables.

What are the requirements for migrating to Navigation 3?

Your project needs compileSdk 36 or later, minSdk 23, strongly typed routes (migrate string-based routes to type-safe routes first), and composable destinations. Deep links, nested navigation beyond one level, and shared destinations are not covered by the migration guide.

How do I pass navigation arguments to a ViewModel in Navigation 3?

Add the lifecycle-viewmodel-navigation3 add-on library and construct the ViewModel with viewModel() inside the entry content. Navigation arguments are read directly from the NavKey instance passed to the entry's trailing lambda.

How do I implement multiple back stacks with a bottom navigation bar in Navigation 3?

Maintain a separate back stack per top-level route in a state holder, track the current top-level route, and expose a flattened list of entries to NavDisplay. The multiple-backstacks and common-ui recipes show complete implementations with state retention.