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


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


<h2 id="expandin-animationspec-expandfrom-clip-initialsize">expandIn</h2>

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


```kotlin
public fun expandIn(
    animationSpec: FiniteAnimationSpec<IntSize> =
        spring(
            stiffness = Spring.StiffnessMediumLow,
            visibilityThreshold = IntSize.VisibilityThreshold,
        ),
    expandFrom: Alignment = Alignment.BottomEnd,
    clip: Boolean = true,
    initialSize: (fullSize: IntSize) -> IntSize = { IntSize(0, 0) },
): EnterTransition
```


This expands the clip bounds of the appearing content from the size returned from `initialSize`
to the full size. `expandFrom` controls which part of the content gets revealed first. By
default, the clip bounds animates from `IntSize(0, 0)` to full size, starting from revealing the
bottom right corner (or bottom left corner in RTL layouts) of the content, to fully revealing the
entire content as the size expands.

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

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

`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.

For expanding only horizontally or vertically, consider `expandHorizontally`, `expandVertically`.

#### Parameters

| | |
| --- | --- |
| animationSpec | the animation used for the expanding animation, `spring` by default. |
| expandFrom | the starting point of the expanding bounds, `Alignment.BottomEnd` by default. |
| clip | whether the content outside of the animated bounds should be clipped, true by default |
| initialSize | the start size of the expanding bounds, returning `IntSize(0, 0)` by default. |