<h2 id="calculatedefaultentertransition-role">calculateDefaultEnterTransition</h2>

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

```kotlin
@ExperimentalMaterial3AdaptiveApi
fun <Role : PaneScaffoldRole> PaneScaffoldMotionDataProvider<Role>.calculateDefaultEnterTransition(
    role: Role
) =
    when (this[role].motion) {
        PaneMotion.EnterFromLeft ->
            slideInHorizontally(PaneMotionDefaults.OffsetAnimationSpec) { slideInFromLeftOffset }
        PaneMotion.EnterFromLeftDelayed ->
            slideInHorizontally(PaneMotionDefaults.DelayedOffsetAnimationSpec) {
                slideInFromLeftOffset
            }
        PaneMotion.EnterFromRight ->
            slideInHorizontally(PaneMotionDefaults.OffsetAnimationSpec) { slideInFromRightOffset }
        PaneMotion.EnterFromRightDelayed ->
            slideInHorizontally(PaneMotionDefaults.DelayedOffsetAnimationSpec) {
                slideInFromRightOffset
            }
        PaneMotion.EnterWithExpand -> {
            expandHorizontally(PaneMotionDefaults.SizeAnimationSpec, Alignment.CenterHorizontally) +
                slideInHorizontally(PaneMotionDefaults.OffsetAnimationSpec) {
                    getHiddenPaneCurrentLeft(role) - this[role].targetLeft
                }
        }
        PaneMotion.EnterAsModal -> {
            fadeIn(animationSpec = PaneMotionDefaults.VisibilityAnimationSpec)
        }
        else -> EnterTransition.None
    }
```

Calculates the default [EnterTransition](/jetpack-compose/androidx.compose.animation/animation/classes/EnterTransition) of the pane associated to the given role when it's
showing. The [PaneMotion](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/interfaces/PaneMotion) and pane measurement data provided by [PaneScaffoldMotionDataProvider](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/interfaces/PaneScaffoldMotionDataProvider)
will be used to decide the transition type and relevant values like sliding offsets.

#### Parameters

| | |
| --- | --- |
| role | the role of the pane that is supposed to perform the [EnterTransition](/jetpack-compose/androidx.compose.animation/animation/classes/EnterTransition) when showing. |