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

> **Deprecated** Deprecated in favor of composable builder that supports AnimatedContent

<h2 id="composable-route-arguments-deeplinks-content">composable</h2>

```kotlin
public fun NavGraphBuilder.composable(
    route: String,
    arguments: List<NamedNavArgument> = emptyList(),
    deepLinks: List<NavDeepLink> = emptyList(),
    content: @Composable (NavBackStackEntry) -> Unit,
)
```

Add the [Composable](/jetpack-compose/androidx.navigation/navigation-compose/functions/composable) to the `NavGraphBuilder`

#### Parameters

| | |
| --- | --- |
| route | route for the destination |
| arguments | list of arguments to associate with destination |
| deepLinks | list of deep links to associate with the destinations |
| content | composable for the destination |

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

> **Deprecated** Deprecated in favor of composable builder that supports sizeTransform

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

<h2 id="composable-route-arguments-deeplinks-entertransition-exittransition-popentertransition-popexittransition-content">composable</h2>

```kotlin
public fun NavGraphBuilder.composable(
    route: String,
    arguments: List<NamedNavArgument> = emptyList(),
    deepLinks: List<NavDeepLink> = emptyList(),
    enterTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition?)? =
        null,
    exitTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition?)? =
        null,
    popEnterTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition?)? =
        enterTransition,
    popExitTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition?)? =
        exitTransition,
    content: @Composable AnimatedContentScope.(NavBackStackEntry) -> Unit,
)
```

Add the [Composable](/jetpack-compose/androidx.navigation/navigation-compose/functions/composable) to the `NavGraphBuilder`

#### Parameters

| | |
| --- | --- |
| route | route for the destination |
| arguments | list of arguments to associate with destination |
| deepLinks | list of deep links to associate with the destinations |
| enterTransition | callback to determine the destination's enter transition |
| exitTransition | callback to determine the destination's exit transition |
| popEnterTransition | callback to determine the destination's popEnter transition |
| popExitTransition | callback to determine the destination's popExit transition |
| content | composable for the destination |

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

<h2 id="composable-route-arguments-deeplinks-entertransition-exittransition-popentertransition-popexittransition-sizetransform-content">composable</h2>

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

```kotlin
public fun NavGraphBuilder.composable(
    route: String,
    arguments: List<NamedNavArgument> = emptyList(),
    deepLinks: List<NavDeepLink> = emptyList(),
    enterTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition?)? =
        null,
    exitTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition?)? =
        null,
    popEnterTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition?)? =
        enterTransition,
    popExitTransition:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition?)? =
        exitTransition,
    sizeTransform:
        (@JvmSuppressWildcards
        AnimatedContentTransitionScope<NavBackStackEntry>.() -> SizeTransform?)? =
        null,
    content: @Composable AnimatedContentScope.(NavBackStackEntry) -> Unit,
)
```

Add the [Composable](/jetpack-compose/androidx.navigation/navigation-compose/functions/composable) to the `NavGraphBuilder`

#### Parameters

| | |
| --- | --- |
| route | route for the destination |
| arguments | list of arguments to associate with destination |
| deepLinks | list of deep links to associate with the destinations |
| enterTransition | callback to determine the destination's enter transition |
| exitTransition | callback to determine the destination's exit transition |
| popEnterTransition | callback to determine the destination's popEnter transition |
| popExitTransition | callback to determine the destination's popExit transition |
| sizeTransform | callback to determine the destination's sizeTransform. |
| content | composable for the destination |

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

<h2 id="composable-typemap-deeplinks">composable</h2>

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

```kotlin
public inline fun <reified T : Any> NavGraphBuilder.composable(
    typeMap: Map<KType, @JvmSuppressWildcards NavType<*>> = emptyMap(),
    deepLinks: List<NavDeepLink> = emptyList(),
    noinline enterTransition:
        (AnimatedContentTransitionScope<NavBackStackEntry>.() -> @JvmSuppressWildcards
            EnterTransition?)? =
        null,
    noinline exitTransition:
        (AnimatedContentTransitionScope<NavBackStackEntry>.() -> @JvmSuppressWildcards
            ExitTransition?)? =
        null,
    noinline popEnterTransition:
        (AnimatedContentTransitionScope<NavBackStackEntry>.() -> @JvmSuppressWildcards
            EnterTransition?)? =
        enterTransition,
    noinline popExitTransition:
        (AnimatedContentTransitionScope<NavBackStackEntry>.() -> @JvmSuppressWildcards
            ExitTransition?)? =
        exitTransition,
    noinline sizeTransform:
        (AnimatedContentTransitionScope<NavBackStackEntry>.() -> @JvmSuppressWildcards
            SizeTransform?)? =
        null,
    noinline content: @Composable AnimatedContentScope.(NavBackStackEntry) -> Unit,
)
```

Add the [Composable](/jetpack-compose/androidx.navigation/navigation-compose/functions/composable) to the `NavGraphBuilder`

#### Parameters

| | |
| --- | --- |
| T | route from a `KClass` for the destination |
| typeMap | map of destination arguments' kotlin type `KType` to its respective custom `NavType`. May be empty if `T` does not use custom NavTypes. |
| deepLinks | list of deep links to associate with the destinations |
| enterTransition | callback to determine the destination's enter transition |
| exitTransition | callback to determine the destination's exit transition |
| popEnterTransition | callback to determine the destination's popEnter transition |
| popExitTransition | callback to determine the destination's popExit transition |
| sizeTransform | callback to determine the destination's sizeTransform. |
| content | composable for the destination |

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

<h2 id="composable-route-typemap-deeplinks-entertransition-exittransition-popentertransition-popexittransition-sizetransform-content">composable</h2>

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

```kotlin
public fun <T : Any> NavGraphBuilder.composable(
    route: KClass<T>,
    typeMap: Map<KType, @JvmSuppressWildcards NavType<*>> = emptyMap(),
    deepLinks: List<NavDeepLink> = emptyList(),
    enterTransition:
        (AnimatedContentTransitionScope<NavBackStackEntry>.() -> @JvmSuppressWildcards
            EnterTransition?)? =
        null,
    exitTransition:
        (AnimatedContentTransitionScope<NavBackStackEntry>.() -> @JvmSuppressWildcards
            ExitTransition?)? =
        null,
    popEnterTransition:
        (AnimatedContentTransitionScope<NavBackStackEntry>.() -> @JvmSuppressWildcards
            EnterTransition?)? =
        enterTransition,
    popExitTransition:
        (AnimatedContentTransitionScope<NavBackStackEntry>.() -> @JvmSuppressWildcards
            ExitTransition?)? =
        exitTransition,
    sizeTransform:
        (AnimatedContentTransitionScope<NavBackStackEntry>.() -> @JvmSuppressWildcards
            SizeTransform?)? =
        null,
    content: @Composable AnimatedContentScope.(NavBackStackEntry) -> Unit,
)
```

Add the [Composable](/jetpack-compose/androidx.navigation/navigation-compose/functions/composable) to the `NavGraphBuilder`

#### Parameters

| | |
| --- | --- |
| route | route from a `KClass` for the destination |
| typeMap | map of destination arguments' kotlin type `KType` to its respective custom `NavType`. May be empty if `route` does not use custom NavTypes. |
| deepLinks | list of deep links to associate with the destinations |
| enterTransition | callback to determine the destination's enter transition |
| exitTransition | callback to determine the destination's exit transition |
| popEnterTransition | callback to determine the destination's popEnter transition |
| popExitTransition | callback to determine the destination's popExit transition |
| sizeTransform | callback to determine the destination's sizeTransform. |
| content | composable for the destination |