<h2 id="modifier-entertransition">Overload 1</h2>

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

```kotlin
@ExperimentalMaterial3AdaptiveApi
@Composable
fun <
    RoleT : PaneScaffoldRole,
    ScaffoldValueT : PaneScaffoldValue<RoleT>,
> ExtendedPaneScaffoldPaneScope<RoleT, ScaffoldValueT>.AnimatedPane(
    modifier: Modifier = Modifier,
    enterTransition: EnterTransition = motionDataProvider.calculateDefaultEnterTransition(paneRole),
    exitTransition: ExitTransition = motionDataProvider.calculateDefaultExitTransition(paneRole),
    boundsAnimationSpec: FiniteAnimationSpec<IntRect> = PaneMotionDefaults.AnimationSpec,
    dragToResizeHandle: (@Composable (DragToResizeState) -> Unit)? = null,
    content: (@Composable AnimatedPaneScope.() -> Unit),
)
```

The root composable of pane contents in a `ThreePaneScaffold` that supports default motions
during pane switching. It's recommended to use this composable to wrap your own contents when
passing them into pane parameters of the scaffold functions, therefore your panes can have a nice
default animation for free.

#### Parameters

| | |
| --- | --- |
| modifier | The modifier applied to the [AnimatedPane](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/composable-functions/AnimatedPane). |
| enterTransition | The [EnterTransition](/jetpack-compose/androidx.compose.animation/animation/classes/EnterTransition) used to animate the pane in. |
| exitTransition | The [ExitTransition](/jetpack-compose/androidx.compose.animation/animation/classes/ExitTransition) used to animate the pane out. |
| boundsAnimationSpec | The [FiniteAnimationSpec](/jetpack-compose/androidx.compose.animation/animation-core/interfaces/FiniteAnimationSpec) used to animate the bounds of the pane when the pane is keeping showing but changing its size and/or position. |
| dragToResizeHandle | The optional handle which will shown when the pane is levitated and drag-to-resizable; the handle will be draggable and clickable to resize the pane freely or among collapsed, partially expanded, and expanded states. See [rememberDragToResizeState](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/composable-functions/rememberDragToResizeState) for more details about how to implement the drag-to-resize behavior. |
| content | The content of the [AnimatedPane](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/composable-functions/AnimatedPane). Also see [AnimatedPaneScope](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/interfaces/AnimatedPaneScope). |

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

> **Deprecated** Keep the old function for binary compatibility

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

<h2 id="modifier-entertransition-2">Overload 2</h2>

```kotlin
@ExperimentalMaterial3AdaptiveApi
@Composable
fun <
    RoleT : PaneScaffoldRole,
    ScaffoldValueT : PaneScaffoldValue<RoleT>,
> ExtendedPaneScaffoldPaneScope<RoleT, ScaffoldValueT>.AnimatedPane(
    modifier: Modifier = Modifier,
    enterTransition: EnterTransition = motionDataProvider.calculateDefaultEnterTransition(paneRole),
    exitTransition: ExitTransition = motionDataProvider.calculateDefaultExitTransition(paneRole),
    boundsAnimationSpec: FiniteAnimationSpec<IntRect> = PaneMotionDefaults.AnimationSpec,
    content: (@Composable AnimatedPaneScope.() -> Unit),
) = AnimatedPane(modifier, enterTransition, exitTransition, boundsAnimationSpec, null, content)
```

The root composable of pane contents in a `ThreePaneScaffold` that supports default motions
during pane switching. It's recommended to use this composable to wrap your own contents when
passing them into pane parameters of the scaffold functions, therefore your panes can have a nice
default animation for free.

#### Parameters

| | |
| --- | --- |
| modifier | The modifier applied to the [AnimatedPane](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/composable-functions/AnimatedPane). |
| enterTransition | The [EnterTransition](/jetpack-compose/androidx.compose.animation/animation/classes/EnterTransition) used to animate the pane in. |
| exitTransition | The [ExitTransition](/jetpack-compose/androidx.compose.animation/animation/classes/ExitTransition) used to animate the pane out. |
| boundsAnimationSpec | The [FiniteAnimationSpec](/jetpack-compose/androidx.compose.animation/animation-core/interfaces/FiniteAnimationSpec) used to animate the bounds of the pane when the pane is keeping showing but changing its size and/or position. |
| content | The content of the [AnimatedPane](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/composable-functions/AnimatedPane). Also see [AnimatedPaneScope](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/interfaces/AnimatedPaneScope). |