<div class='type'>Function</div>


<a id='references'></a>


<h2 id="slideinvertically-animationspec-initialoffsety">slideInVertically</h2>

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


```kotlin
public fun slideInVertically(
    animationSpec: FiniteAnimationSpec<IntOffset> =
        spring(
            stiffness = Spring.StiffnessMediumLow,
            visibilityThreshold = IntOffset.VisibilityThreshold,
        ),
    initialOffsetY: (fullHeight: Int) -> Int = { -it / 2 },
): EnterTransition
```


This slides in the content vertically, from a starting offset defined in `initialOffsetY` to `0`
in **pixels**. The direction of the slide can be controlled by configuring the `initialOffsetY`.
A positive initial offset means sliding up, whereas a negative value would slide the content
down.

`initialOffsetY` is a lambda that takes the full Height of the content and returns an offset.
This allows the starting offset to be defined proportional to the full height, or as an absolute
value. It defaults to return half of negative height, which would offset the content up by half
of its Height, and slide down.

#### Parameters

| | |
| --- | --- |
| animationSpec | the animation used for the slide-in, `spring` by default. |
| initialOffsetY | a lambda that takes the full Height of the content and returns the initial offset for the slide-in, by default it returns `-fullHeight/2` |