Get started
Stay organized with collections
Save and categorize content based on your preferences.
To get started with Navigation 3, add the library to your project along with any
supporting libraries. Use the table below to decide which libraries to add.
Artifacts
Name |
What it does |
Artifact |
Navigation 3 runtime library |
Core Navigation 3 API. Includes NavEntry, EntryProvider and the associated DSL. |
androidx.navigation3:navigation3-runtime |
Navigation 3 UI library |
Provides classes to display content, including NavDisplay and Scene . |
androidx.navigation3:navigation3-ui |
ViewModel Lifecycle for Navigation 3 |
Allows ViewModels to be scoped to entries in the back stack. |
androidx.lifecycle:lifecycle-viewmodel-navigation3 |
Material 3 adaptive layouts for Navigation 3 |
Provides adaptive layouts (SceneStrategies, Scenes and metadata definitions) for use with NavDisplay. |
androidx.compose.material3.adaptive:adaptive-navigation3 Available in snapshot builds |
KotlinX Serialization |
Allows navigation keys to be serialized. |
Plugin: org.jetbrains.kotlin.plugin.serialization Library: org.jetbrains.kotlinx:kotlinx-serialization-core |
Project setup
To add the Navigation 3 library to your existing project, add the following to
your libs.versions.toml
:
[versions]
nav3Core = "1.0.0-alpha01"
lifecycleViewmodelNav3 = "1.0.0-alpha01"
kotlinSerialization = "2.1.21"
kotlinxSerializationCore = "1.8.1"
material3AdaptiveNav3 = "1.0.0-SNAPSHOT"
[libraries]
# Core Navigation 3 libraries
androidx-navigation3-runtime = { module = "androidx.navigation3:navigation3-runtime", version.ref = "nav3Core" }
androidx-navigation3-ui = { module = "androidx.navigation3:navigation3-ui", version.ref = "nav3Core" }
# Optional add-on libraries
androidx-lifecycle-viewmodel-navigation3 = { module = "androidx.lifecycle:lifecycle-viewmodel-navigation3", version.ref = "lifecycleViewmodelNav3" }
kotlinx-serialization-core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "kotlinxSerializationCore" }
# Note: The Material3 adaptive layouts library for Navigation 3 is currently
# only available in snapshot builds. Follow the instructions at androidx.dev to
# add the snapshot builds repository to your project.
androidx-material3-adaptive-navigation3 = { group = "androidx.compose.material3.adaptive", name = "adaptive-navigation3", version.ref = "material3AdaptiveNav3" }
[plugins]
# Optional plugins
jetbrains-kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlinSerialization"}
Also, update your compile SDK to 36 or above:
[versions]
compileSdk = "36"
Add the following to your app build file app/build.gradle.kts
:
plugins {
...
// Optional, provides the @Serialize annotation for autogeneration of Serializers.
alias(libs.plugins.jetbrains.kotlin.serialization)
}
dependencies {
...
implementation(libs.androidx.navigation3.ui)
implementation(libs.androidx.navigation3.runtime)
implementation(libs.androidx.lifecycle.viewmodel.navigation3)
implementation(libs.androidx.material3.adaptive.navigation3)
implementation(libs.kotlinx.serialization.core)
}
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-06-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-10 UTC."],[],[],null,["# Get started\n\nTo get started with Navigation 3, add the library to your project along with any\nsupporting libraries. Use the table below to decide which libraries to add.\n\nArtifacts\n---------\n\n| **Name** | **What it does** | **Artifact** |\n|-------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|\n| Navigation 3 runtime library | Core Navigation 3 API. Includes `NavEntry, EntryProvider` and the associated DSL. | androidx.navigation3:navigation3-runtime |\n| Navigation 3 UI library | Provides classes to display content, including `NavDisplay` and `Scene`. | androidx.navigation3:navigation3-ui |\n| ViewModel Lifecycle for Navigation 3 | Allows ViewModels to be scoped to entries in the back stack. | androidx.lifecycle:lifecycle-viewmodel-navigation3 |\n| Material 3 adaptive layouts for Navigation 3 | Provides adaptive layouts (SceneStrategies, Scenes and metadata definitions) for use with NavDisplay. | androidx.compose.material3.adaptive:adaptive-navigation3 Available in [snapshot builds](https://androidx.dev/) |\n| [KotlinX Serialization](https://kotlinlang.org/docs/serialization.html) | Allows navigation keys to be serialized. | Plugin: org.jetbrains.kotlin.plugin.serialization Library: org.jetbrains.kotlinx:kotlinx-serialization-core |\n\nProject setup\n-------------\n\nTo add the Navigation 3 library to your existing project, add the following to\nyour `libs.versions.toml`: \n\n [versions]\n nav3Core = \"1.0.0-alpha01\"\n lifecycleViewmodelNav3 = \"1.0.0-alpha01\"\n kotlinSerialization = \"2.1.21\"\n kotlinxSerializationCore = \"1.8.1\"\n material3AdaptiveNav3 = \"1.0.0-SNAPSHOT\"\n\n [libraries]\n # Core Navigation 3 libraries\n androidx-navigation3-runtime = { module = \"androidx.navigation3:navigation3-runtime\", version.ref = \"nav3Core\" }\n androidx-navigation3-ui = { module = \"androidx.navigation3:navigation3-ui\", version.ref = \"nav3Core\" }\n\n # Optional add-on libraries\n androidx-lifecycle-viewmodel-navigation3 = { module = \"androidx.lifecycle:lifecycle-viewmodel-navigation3\", version.ref = \"lifecycleViewmodelNav3\" }\n kotlinx-serialization-core = { module = \"org.jetbrains.kotlinx:kotlinx-serialization-core\", version.ref = \"kotlinxSerializationCore\" }\n\n # Note: The Material3 adaptive layouts library for Navigation 3 is currently\n # only available in snapshot builds. Follow the instructions at androidx.dev to\n # add the snapshot builds repository to your project.\n androidx-material3-adaptive-navigation3 = { group = \"androidx.compose.material3.adaptive\", name = \"adaptive-navigation3\", version.ref = \"material3AdaptiveNav3\" }\n\n [plugins]\n # Optional plugins\n jetbrains-kotlin-serialization = { id = \"org.jetbrains.kotlin.plugin.serialization\", version.ref = \"kotlinSerialization\"}\n\nAlso, update your compile SDK to 36 or above: \n\n [versions]\n compileSdk = \"36\"\n\nAdd the following to your **app** build file `app/build.gradle.kts`: \n\n plugins {\n ...\n // Optional, provides the @Serialize annotation for autogeneration of Serializers.\n alias(libs.plugins.jetbrains.kotlin.serialization)\n }\n\n dependencies {\n ...\n implementation(libs.androidx.navigation3.ui)\n implementation(libs.androidx.navigation3.runtime)\n implementation(libs.androidx.lifecycle.viewmodel.navigation3)\n implementation(libs.androidx.material3.adaptive.navigation3)\n implementation(libs.kotlinx.serialization.core)\n }"]]