<div class='sourceset sourceset-common'>Common</div>

> **Deprecated** Deprecated in favor of NavHost that supports AnimatedContent

<h2 id="navhost-navcontroller-startdestination-modifier-route-builder">NavHost</h2>

```kotlin
@Composable
public fun NavHost(
    navController: NavHostController,
    startDestination: String,
    modifier: Modifier = Modifier,
    route: String? = null,
    builder: NavGraphBuilder.() -> Unit,
)
```

Provides a place in the Compose hierarchy for self contained navigation to occur.

Once this is called, any Composable within the given `NavGraphBuilder` can be navigated to from
the provided [navController](#navcontroller).

The builder passed into this method is [remember](/jetpack-compose/androidx.compose.runtime/runtime/composable-functions/remember)ed. This means that for this NavHost, the
contents of the builder cannot be changed.

#### Parameters

| | |
| --- | --- |
| navController | the navController for this host |
| startDestination | the route for the start destination |
| modifier | The modifier to be applied to the layout. |
| route | the route for the graph |
| builder | the builder used to construct the graph |

<div class='sourceset sourceset-common'>Common</div>

> **Deprecated** Deprecated in favor of NavHost that supports sizeTransform

<hr class="docs-overload-divider">

<h2 id="navhost-navcontroller-startdestination-modifier-contentalignment-route-entertransition-exittransition-popentertransition-popexittransition-builder">NavHost</h2>

```kotlin
@Composable
public fun NavHost(
    navController: NavHostController,
    startDestination: String,
    modifier: Modifier = Modifier,
    contentAlignment: Alignment = Alignment.TopStart,
    route: String? = null,
    enterTransition: (AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition) =
        DefaultNavTransitions.enterTransition,
    exitTransition: (AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition) =
        DefaultNavTransitions.exitTransition,
    popEnterTransition: (AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition) =
        enterTransition,
    popExitTransition: (AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition) =
        exitTransition,
    builder: NavGraphBuilder.() -> Unit,
)
```

Provides a place in the Compose hierarchy for self contained navigation to occur.

Once this is called, any Composable within the given `NavGraphBuilder` can be navigated to from
the provided [navController](#navcontroller).

The builder passed into this method is [remember](/jetpack-compose/androidx.compose.runtime/runtime/composable-functions/remember)ed. This means that for this NavHost, the
contents of the builder cannot be changed.

#### Parameters

| | |
| --- | --- |
| navController | the navController for this host |
| startDestination | the route for the start destination |
| modifier | The modifier to be applied to the layout. |
| contentAlignment | The [Alignment](/jetpack-compose/androidx.compose.ui/ui/interfaces/Alignment) of the [AnimatedContent](/jetpack-compose/androidx.compose.animation/animation/composable-functions/AnimatedContent) |
| route | the route for the graph |
| enterTransition | callback to define enter transitions for destination in this host |
| exitTransition | callback to define exit transitions for destination in this host |
| popEnterTransition | callback to define popEnter transitions for destination in this host |
| popExitTransition | callback to define popExit transitions for destination in this host |
| builder | the builder used to construct the graph |

<div class='sourceset sourceset-common'>Common</div>

> **Deprecated** Deprecated in favor of NavHost that supports predictivePopEnterTransition and predictivePopExitTransition

<hr class="docs-overload-divider">

<h2 id="navhost-navcontroller-startdestination-modifier-contentalignment-route-entertransition-exittransition-popentertransition-popexittransition-sizetransform-builder">NavHost</h2>

```kotlin
@Composable
public fun NavHost(
    navController: NavHostController,
    startDestination: String,
    modifier: Modifier = Modifier,
    contentAlignment: Alignment = Alignment.TopStart,
    route: String? = null,
    enterTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition) =
        DefaultNavTransitions.enterTransition,
    exitTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition) =
        DefaultNavTransitions.exitTransition,
    popEnterTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition) =
        enterTransition,
    popExitTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition) =
        exitTransition,
    sizeTransform:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> SizeTransform?)? =
        DefaultNavTransitions.sizeTransform,
    builder: NavGraphBuilder.() -> Unit,
)
```

Provides a place in the Compose hierarchy for self contained navigation to occur.

Once this is called, any Composable within the given `NavGraphBuilder` can be navigated to from
the provided [navController](#navcontroller).

The builder passed into this method is [remember](/jetpack-compose/androidx.compose.runtime/runtime/composable-functions/remember)ed. This means that for this NavHost, the
contents of the builder cannot be changed.

#### Parameters

| | |
| --- | --- |
| navController | the navController for this host |
| startDestination | the route for the start destination |
| modifier | The modifier to be applied to the layout. |
| contentAlignment | The [Alignment](/jetpack-compose/androidx.compose.ui/ui/interfaces/Alignment) of the [AnimatedContent](/jetpack-compose/androidx.compose.animation/animation/composable-functions/AnimatedContent) |
| route | the route for the graph |
| enterTransition | callback to define enter transitions for destination in this host |
| exitTransition | callback to define exit transitions for destination in this host |
| popEnterTransition | callback to define popEnter transitions for destination in this host |
| popExitTransition | callback to define popExit transitions for destination in this host |
| sizeTransform | callback to define the size transform for destinations in this host |
| builder | the builder used to construct the graph |

<hr class="docs-overload-divider">

<h2 id="navhost-navcontroller-startdestination-modifier-contentalignment-route-entertransition-exittransition-popentertransition-popexittransition-predictivepopentertransition-predictivepopexittransition-sizetransform-builder">NavHost</h2>

<div class='sourceset sourceset-common'>Common</div>

```kotlin
@Composable
public fun NavHost(
    navController: NavHostController,
    startDestination: String,
    modifier: Modifier = Modifier,
    contentAlignment: Alignment = Alignment.TopStart,
    route: String? = null,
    enterTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition) =
        DefaultNavTransitions.enterTransition,
    exitTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition) =
        DefaultNavTransitions.exitTransition,
    popEnterTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition) =
        enterTransition,
    popExitTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition) =
        exitTransition,
    predictivePopEnterTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.(Int) -> EnterTransition) =
        DefaultNavTransitions.predictivePopEnterTransition,
    predictivePopExitTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.(Int) -> ExitTransition) =
        DefaultNavTransitions.predictivePopExitTransition,
    sizeTransform:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> SizeTransform?)? =
        DefaultNavTransitions.sizeTransform,
    builder: NavGraphBuilder.() -> Unit,
)
```

Provides a place in the Compose hierarchy for self contained navigation to occur.

Once this is called, any Composable within the given `NavGraphBuilder` can be navigated to from
the provided [navController](#navcontroller).

The builder passed into this method is [remember](/jetpack-compose/androidx.compose.runtime/runtime/composable-functions/remember)ed. This means that for this NavHost, the
contents of the builder cannot be changed.

#### Parameters

| | |
| --- | --- |
| navController | the navController for this host |
| startDestination | the route for the start destination |
| modifier | The modifier to be applied to the layout. |
| contentAlignment | The [Alignment](/jetpack-compose/androidx.compose.ui/ui/interfaces/Alignment) of the [AnimatedContent](/jetpack-compose/androidx.compose.animation/animation/composable-functions/AnimatedContent) |
| route | the route for the graph |
| enterTransition | callback to define enter transitions for destination in this host |
| exitTransition | callback to define exit transitions for destination in this host |
| popEnterTransition | callback to define popEnter transitions for destination in this host |
| popExitTransition | callback to define popExit transitions for destination in this host |
| predictivePopEnterTransition | callback to define predictivePopEnter transitions for destination in this host |
| predictivePopExitTransition | callback to define predictivePopExit transitions for destination in this host |
| sizeTransform | callback to define the size transform for destinations in this host |
| builder | the builder used to construct the graph |

<div class='sourceset sourceset-common'>Common</div>

> **Deprecated** Deprecated in favor of NavHost that supports predictivePopEnterTransition and predictivePopExitTransition

<hr class="docs-overload-divider">

<h2 id="navhost-navcontroller-startdestination-modifier-contentalignment-route-typemap-entertransition-exittransition-popentertransition-popexittransition-sizetransform-builder">NavHost</h2>

```kotlin
@Composable
public fun NavHost(
    navController: NavHostController,
    startDestination: KClass<*>,
    modifier: Modifier = Modifier,
    contentAlignment: Alignment = Alignment.TopStart,
    route: KClass<*>? = null,
    typeMap: Map<KType, @JvmSuppressWildcards NavType<*>> = emptyMap(),
    enterTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition) =
        DefaultNavTransitions.enterTransition,
    exitTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition) =
        DefaultNavTransitions.exitTransition,
    popEnterTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition) =
        enterTransition,
    popExitTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition) =
        exitTransition,
    sizeTransform:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> SizeTransform?)? =
        DefaultNavTransitions.sizeTransform,
    builder: NavGraphBuilder.() -> Unit,
)
```

Provides a place in the Compose hierarchy for self contained navigation to occur.

Once this is called, any Composable within the given `NavGraphBuilder` can be navigated to from
the provided [navController](#navcontroller).

The builder passed into this method is [remember](/jetpack-compose/androidx.compose.runtime/runtime/composable-functions/remember)ed. This means that for this NavHost, the
contents of the builder cannot be changed.

#### Parameters

| | |
| --- | --- |
| navController | the navController for this host |
| startDestination | the route from a `KClass` for the start destination |
| modifier | The modifier to be applied to the layout. |
| contentAlignment | The [Alignment](/jetpack-compose/androidx.compose.ui/ui/interfaces/Alignment) of the [AnimatedContent](/jetpack-compose/androidx.compose.animation/animation/composable-functions/AnimatedContent) |
| route | the route from a `KClass` for the graph |
| typeMap | map of destination arguments' kotlin type `KType` to its respective custom `NavType`. May be empty if `route` does not use custom NavTypes. |
| enterTransition | callback to define enter transitions for destination in this host |
| exitTransition | callback to define exit transitions for destination in this host |
| popEnterTransition | callback to define popEnter transitions for destination in this host |
| popExitTransition | callback to define popExit transitions for destination in this host |
| sizeTransform | callback to define the size transform for destinations in this host |
| builder | the builder used to construct the graph |

<hr class="docs-overload-divider">

<h2 id="navhost-navcontroller-startdestination-modifier-contentalignment-route-typemap-entertransition-exittransition-popentertransition-popexittransition-predictivepopentertransition-predictivepopexittransition-sizetransform-builder">NavHost</h2>

<div class='sourceset sourceset-common'>Common</div>

```kotlin
@Composable
public fun NavHost(
    navController: NavHostController,
    startDestination: KClass<*>,
    modifier: Modifier = Modifier,
    contentAlignment: Alignment = Alignment.TopStart,
    route: KClass<*>? = null,
    typeMap: Map<KType, @JvmSuppressWildcards NavType<*>> = emptyMap(),
    enterTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition) =
        DefaultNavTransitions.enterTransition,
    exitTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition) =
        DefaultNavTransitions.exitTransition,
    popEnterTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition) =
        enterTransition,
    popExitTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition) =
        exitTransition,
    predictivePopEnterTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.(Int) -> EnterTransition) =
        DefaultNavTransitions.predictivePopEnterTransition,
    predictivePopExitTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.(Int) -> ExitTransition) =
        DefaultNavTransitions.predictivePopExitTransition,
    sizeTransform:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> SizeTransform?)? =
        DefaultNavTransitions.sizeTransform,
    builder: NavGraphBuilder.() -> Unit,
)
```

Provides a place in the Compose hierarchy for self contained navigation to occur.

Once this is called, any Composable within the given `NavGraphBuilder` can be navigated to from
the provided [navController](#navcontroller).

The builder passed into this method is [remember](/jetpack-compose/androidx.compose.runtime/runtime/composable-functions/remember)ed. This means that for this NavHost, the
contents of the builder cannot be changed.

#### Parameters

| | |
| --- | --- |
| navController | the navController for this host |
| startDestination | the route from a `KClass` for the start destination |
| modifier | The modifier to be applied to the layout. |
| contentAlignment | The [Alignment](/jetpack-compose/androidx.compose.ui/ui/interfaces/Alignment) of the [AnimatedContent](/jetpack-compose/androidx.compose.animation/animation/composable-functions/AnimatedContent) |
| route | the route from a `KClass` for the graph |
| typeMap | map of destination arguments' kotlin type `KType` to its respective custom `NavType`. May be empty if `route` does not use custom NavTypes. |
| enterTransition | callback to define enter transitions for destination in this host |
| exitTransition | callback to define exit transitions for destination in this host |
| popEnterTransition | callback to define popEnter transitions for destination in this host |
| popExitTransition | callback to define popExit transitions for destination in this host |
| predictivePopEnterTransition | callback to define predictivePopEnter transitions for destination in this host |
| predictivePopExitTransition | callback to define predictivePopExit transitions for destination in this host |
| sizeTransform | callback to define the size transform for destinations in this host |
| builder | the builder used to construct the graph |

<div class='sourceset sourceset-common'>Common</div>

> **Deprecated** Deprecated in favor of NavHost that supports predictivePopEnterTransition and predictivePopExitTransition

<hr class="docs-overload-divider">

<h2 id="navhost-navcontroller-startdestination-modifier-contentalignment-route-typemap-entertransition-exittransition-popentertransition-popexittransition-sizetransform-builder-2">NavHost</h2>

```kotlin
@Composable
public fun NavHost(
    navController: NavHostController,
    startDestination: Any,
    modifier: Modifier = Modifier,
    contentAlignment: Alignment = Alignment.TopStart,
    route: KClass<*>? = null,
    typeMap: Map<KType, @JvmSuppressWildcards NavType<*>> = emptyMap(),
    enterTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition) =
        DefaultNavTransitions.enterTransition,
    exitTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition) =
        DefaultNavTransitions.exitTransition,
    popEnterTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition) =
        enterTransition,
    popExitTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition) =
        exitTransition,
    sizeTransform:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> SizeTransform?)? =
        DefaultNavTransitions.sizeTransform,
    builder: NavGraphBuilder.() -> Unit,
)
```

Provides in place in the Compose hierarchy for self contained navigation to occur.

Once this is called, any Composable within the given `NavGraphBuilder` can be navigated to from
the provided [navController](#navcontroller).

The builder passed into this method is [remember](/jetpack-compose/androidx.compose.runtime/runtime/composable-functions/remember)ed. This means that for this NavHost, the
contents of the builder cannot be changed.

#### Parameters

| | |
| --- | --- |
| navController | the navController for this host |
| startDestination | the route from a an Object for the start destination |
| modifier | The modifier to be applied to the layout. |
| contentAlignment | The [Alignment](/jetpack-compose/androidx.compose.ui/ui/interfaces/Alignment) of the [AnimatedContent](/jetpack-compose/androidx.compose.animation/animation/composable-functions/AnimatedContent) |
| route | the route from a `KClass` for the graph |
| typeMap | map of destination arguments' kotlin type `KType` to its respective custom `NavType`. May be empty if `route` does not use custom NavTypes. |
| enterTransition | callback to define enter transitions for destination in this host |
| exitTransition | callback to define exit transitions for destination in this host |
| popEnterTransition | callback to define popEnter transitions for destination in this host |
| popExitTransition | callback to define popExit transitions for destination in this host |
| sizeTransform | callback to define the size transform for destinations in this host |
| builder | the builder used to construct the graph |

<hr class="docs-overload-divider">

<h2 id="navhost-navcontroller-startdestination-modifier-contentalignment-route-typemap-entertransition-exittransition-popentertransition-popexittransition-predictivepopentertransition-predictivepopexittransition-sizetransform-builder-2">NavHost</h2>

<div class='sourceset sourceset-common'>Common</div>

```kotlin
@Composable
public fun NavHost(
    navController: NavHostController,
    startDestination: Any,
    modifier: Modifier = Modifier,
    contentAlignment: Alignment = Alignment.TopStart,
    route: KClass<*>? = null,
    typeMap: Map<KType, @JvmSuppressWildcards NavType<*>> = emptyMap(),
    enterTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition) =
        DefaultNavTransitions.enterTransition,
    exitTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition) =
        DefaultNavTransitions.exitTransition,
    popEnterTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition) =
        enterTransition,
    popExitTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition) =
        exitTransition,
    predictivePopEnterTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.(Int) -> EnterTransition) =
        DefaultNavTransitions.predictivePopEnterTransition,
    predictivePopExitTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.(Int) -> ExitTransition) =
        DefaultNavTransitions.predictivePopExitTransition,
    sizeTransform:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> SizeTransform?)? =
        DefaultNavTransitions.sizeTransform,
    builder: NavGraphBuilder.() -> Unit,
)
```

Provides in place in the Compose hierarchy for self contained navigation to occur.

Once this is called, any Composable within the given `NavGraphBuilder` can be navigated to from
the provided [navController](#navcontroller).

The builder passed into this method is [remember](/jetpack-compose/androidx.compose.runtime/runtime/composable-functions/remember)ed. This means that for this NavHost, the
contents of the builder cannot be changed.

#### Parameters

| | |
| --- | --- |
| navController | the navController for this host |
| startDestination | the route from a an Object for the start destination |
| modifier | The modifier to be applied to the layout. |
| contentAlignment | The [Alignment](/jetpack-compose/androidx.compose.ui/ui/interfaces/Alignment) of the [AnimatedContent](/jetpack-compose/androidx.compose.animation/animation/composable-functions/AnimatedContent) |
| route | the route from a `KClass` for the graph |
| typeMap | map of destination arguments' kotlin type `KType` to its respective custom `NavType`. May be empty if `route` does not use custom NavTypes. |
| enterTransition | callback to define enter transitions for destination in this host |
| exitTransition | callback to define exit transitions for destination in this host |
| popEnterTransition | callback to define popEnter transitions for destination in this host |
| popExitTransition | callback to define popExit transitions for destination in this host |
| predictivePopEnterTransition | callback to define predictivePopEnter transitions for destination in this host |
| predictivePopExitTransition | callback to define predictivePopExit transitions for destination in this host |
| sizeTransform | callback to define the size transform for destinations in this host |
| builder | the builder used to construct the graph |

<div class='sourceset sourceset-common'>Common</div>

> **Deprecated** Deprecated in favor of NavHost that supports AnimatedContent

<hr class="docs-overload-divider">

<h2 id="navhost-navcontroller-graph-modifier">NavHost</h2>

```kotlin
@Composable
public fun NavHost(
    navController: NavHostController,
    graph: NavGraph,
    modifier: Modifier = Modifier,
): Unit
```

Provides in place in the Compose hierarchy for self contained navigation to occur.

Once this is called, any Composable within the given `NavGraphBuilder` can be navigated to from
the provided [navController](#navcontroller).

The graph passed into this method is [remember](/jetpack-compose/androidx.compose.runtime/runtime/composable-functions/remember)ed. This means that for this NavHost, the graph
cannot be changed.

#### Parameters

| | |
| --- | --- |
| navController | the navController for this host |
| graph | the graph for this host |
| modifier | The modifier to be applied to the layout. |

<div class='sourceset sourceset-common'>Common</div>

> **Deprecated** Deprecated in favor of NavHost that supports sizeTransform

<hr class="docs-overload-divider">

<h2 id="navhost-navcontroller-graph-modifier-contentalignment-entertransition-exittransition-popentertransition-popexittransition">NavHost</h2>

```kotlin
@Composable
public fun NavHost(
    navController: NavHostController,
    graph: NavGraph,
    modifier: Modifier = Modifier,
    contentAlignment: Alignment = Alignment.TopStart,
    enterTransition: (AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition) =
        DefaultNavTransitions.enterTransition,
    exitTransition: (AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition) =
        DefaultNavTransitions.exitTransition,
    popEnterTransition: (AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition) =
        enterTransition,
    popExitTransition: (AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition) =
        exitTransition,
)
```

Provides a place in the Compose hierarchy for self contained navigation to occur.

Once this is called, any Composable within the given `NavGraphBuilder` can be navigated to from
the provided [navController](#navcontroller).

#### Parameters

| | |
| --- | --- |
| navController | the navController for this host |
| graph | the graph for this host |
| modifier | The modifier to be applied to the layout. |
| contentAlignment | The [Alignment](/jetpack-compose/androidx.compose.ui/ui/interfaces/Alignment) of the [AnimatedContent](/jetpack-compose/androidx.compose.animation/animation/composable-functions/AnimatedContent) |
| enterTransition | callback to define enter transitions for destination in this host |
| exitTransition | callback to define exit transitions for destination in this host |
| popEnterTransition | callback to define popEnter transitions for destination in this host |
| popExitTransition | callback to define popExit transitions for destination in this host |

<div class='sourceset sourceset-common'>Common</div>

> **Deprecated** Deprecated in favor of NavHost that supports predictivePopEnterTransition and predictivePopExitTransition

<hr class="docs-overload-divider">

<h2 id="navhost-navcontroller-graph-modifier-contentalignment-entertransition-exittransition-popentertransition-popexittransition-sizetransform">NavHost</h2>

```kotlin
@Composable
public fun NavHost(
    navController: NavHostController,
    graph: NavGraph,
    modifier: Modifier = Modifier,
    contentAlignment: Alignment = Alignment.TopStart,
    enterTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition) =
        DefaultNavTransitions.enterTransition,
    exitTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition) =
        DefaultNavTransitions.exitTransition,
    popEnterTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition) =
        enterTransition,
    popExitTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition) =
        exitTransition,
    sizeTransform:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> SizeTransform?)? =
        DefaultNavTransitions.sizeTransform,
)
```

Provides a place in the Compose hierarchy for self contained navigation to occur.

Once this is called, any Composable within the given `NavGraphBuilder` can be navigated to from
the provided [navController](#navcontroller).

#### Parameters

| | |
| --- | --- |
| navController | the navController for this host |
| graph | the graph for this host |
| modifier | The modifier to be applied to the layout. |
| contentAlignment | The [Alignment](/jetpack-compose/androidx.compose.ui/ui/interfaces/Alignment) of the [AnimatedContent](/jetpack-compose/androidx.compose.animation/animation/composable-functions/AnimatedContent) |
| enterTransition | callback to define enter transitions for destination in this host |
| exitTransition | callback to define exit transitions for destination in this host |
| popEnterTransition | callback to define popEnter transitions for destination in this host |
| popExitTransition | callback to define popExit transitions for destination in this host |
| sizeTransform | callback to define the size transform for destinations in this host |

<hr class="docs-overload-divider">

<h2 id="navhost-navcontroller-graph-modifier-contentalignment-entertransition-exittransition-popentertransition-popexittransition-predictivepopentertransition-predictivepopexittransition-sizetransform">NavHost</h2>

<div class='sourceset sourceset-common'>Common</div>

```kotlin
@Composable
public fun NavHost(
    navController: NavHostController,
    graph: NavGraph,
    modifier: Modifier = Modifier,
    contentAlignment: Alignment = Alignment.TopStart,
    enterTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition) =
        DefaultNavTransitions.enterTransition,
    exitTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition) =
        DefaultNavTransitions.exitTransition,
    popEnterTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition) =
        enterTransition,
    popExitTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition) =
        exitTransition,
    predictivePopEnterTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.(Int) -> EnterTransition) =
        DefaultNavTransitions.predictivePopEnterTransition,
    predictivePopExitTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.(Int) -> ExitTransition) =
        DefaultNavTransitions.predictivePopExitTransition,
    sizeTransform:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> SizeTransform?)? =
        DefaultNavTransitions.sizeTransform,
)
```

Provides a place in the Compose hierarchy for self contained navigation to occur.

Once this is called, any Composable within the given `NavGraphBuilder` can be navigated to from
the provided [navController](#navcontroller).

#### Parameters

| | |
| --- | --- |
| navController | the navController for this host |
| graph | the graph for this host |
| modifier | The modifier to be applied to the layout. |
| contentAlignment | The [Alignment](/jetpack-compose/androidx.compose.ui/ui/interfaces/Alignment) of the [AnimatedContent](/jetpack-compose/androidx.compose.animation/animation/composable-functions/AnimatedContent) |
| enterTransition | callback to define enter transitions for destination in this host |
| exitTransition | callback to define exit transitions for destination in this host |
| popEnterTransition | callback to define popEnter transitions for destination in this host |
| popExitTransition | callback to define popExit transitions for destination in this host |
| predictivePopEnterTransition | callback to define predictivePopEnter transitions for destination in this host |
| predictivePopExitTransition | callback to define predictivePopExit transitions for destination in this host |
| sizeTransform | callback to define the size transform for destinations in this host |