slideInHorizontally
fun slideInHorizontally(spec: FiniteAnimationSpec<Float> = spring(), initialOffsetX: (fullWidth: Int) -> Int = { -it }): EnterTransition
Slides content in horizontally. The initialOffsetX lambda receives the full width of the component and returns the pixel offset to start from.
Parameters
spec
The animation spec for the slide. Defaults to spring.
initialOffsetX
Returns the initial X offset in pixels. Defaults to sliding in from the start (-fullWidth).
fun slideInHorizontally(duration: Duration, initialOffsetX: (fullWidth: Int) -> Int = { -it }): EnterTransition
Slides content in horizontally over duration — a shortcut for slideInHorizontally(tween(duration), initialOffsetX).
Parameters
duration
How long the slide runs.
initialOffsetX
Returns the initial X offset in pixels. Defaults to sliding in from the start (-fullWidth).