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


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


<h2 id="slidein-animationspec-initialoffset">slideIn</h2>

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


```kotlin
public fun slideIn(
    animationSpec: FiniteAnimationSpec<IntOffset> =
        spring(
            stiffness = Spring.StiffnessMediumLow,
            visibilityThreshold = IntOffset.VisibilityThreshold,
        ),
    initialOffset: (fullSize: IntSize) -> IntOffset,
): EnterTransition
```


This slides in the content of the transition, from a starting offset defined in `initialOffset`
to `IntOffset(0, 0)`. The direction of the slide can be controlled by configuring the
`initialOffset`. A positive x value means sliding from right to left, whereas a negative x value
will slide the content to the right. Similarly positive and negative y values correspond to
sliding up and down, respectively.

If the sliding is only desired horizontally or vertically, instead of along both axis, consider
using `slideInHorizontally` or `slideInVertically`.

`initialOffset` is a lambda that takes the full size of the content and returns an offset. This
allows the offset to be defined proportional to the full size, or as an absolute value.

#### Parameters

| | |
| --- | --- |
| animationSpec | the animation used for the slide-in, `spring` by default. |
| initialOffset | a lambda that takes the full size of the content and returns the initial offset for the slide-in |