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


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


<h2 id="expandvertically-animationspec-expandfrom-clip-initialheight">expandVertically</h2>

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


```kotlin
public fun expandVertically(
    animationSpec: FiniteAnimationSpec<IntSize> =
        spring(
            stiffness = Spring.StiffnessMediumLow,
            visibilityThreshold = IntSize.VisibilityThreshold,
        ),
    expandFrom: Alignment.Vertical = Alignment.Bottom,
    clip: Boolean = true,
    initialHeight: (fullHeight: Int) -> Int = { 0 },
): EnterTransition
```


This expands the clip bounds of the appearing content vertically, from the height returned from
`initialHeight` to the full height. `expandFrom` controls which part of the content gets revealed
first. By default, the clip bounds animates from 0 to full height, revealing the bottom edge
first, followed by the rest of the content.

__Note__: `expandVertically` animates the bounds of the content. This bounds change will also
result in the animation of other layouts that are dependent on this size.

`initialHeight` is a lambda that takes the full height of the content and returns an initial
height of the bounds of the content. This allows not only an absolute height, but also an initial
height that is proportional to the content height.

`clip` defines whether the content outside of the animated bounds should be clipped. By default,
clip is set to true, which only shows content in the animated bounds.

#### Parameters

| | |
| --- | --- |
| animationSpec | the animation used for the expanding animation, `spring` by default. |
| expandFrom | the starting point of the expanding bounds, `Alignment.Bottom` by default. |
| clip | whether the content outside of the animated bounds should be clipped, true by default |
| initialHeight | the start height of the expanding bounds, returning 0 by default. |