---
title: "slideOutVertically"
description: "This slides out the content vertically, from 0 to a target offset defined in [targetOffsetY] in
**pixels**. The direction of the slide-out can be controlled by configuring the [targetOffsetY].
A positive target offset means sliding down, whereas a negative value would slide the content up.

[targetOffsetY] is a lambda that takes the full Height of the content and returns an offset. This
allows the target offset to be defined proportional to the full height, or as an absolute value.
It defaults to return half of the negative height, which would slide the content up by half of
its Height."
type: "function"
---

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


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


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


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

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

#### Parameters

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




