slideOutHorizontally

fun slideOutHorizontally(spec: FiniteAnimationSpec<Float> = spring(), targetOffsetX: (fullWidth: Int) -> Int = { -it }): ExitTransition

Slides content out horizontally. The targetOffsetX lambda receives the full width of the component and returns the pixel offset to end at.

Parameters

spec

The animation spec for the slide. Defaults to spring.

targetOffsetX

Returns the target X offset in pixels. Defaults to sliding out to the start (-fullWidth).


fun slideOutHorizontally(duration: Duration, targetOffsetX: (fullWidth: Int) -> Int = { -it }): ExitTransition

Slides content out horizontally over duration — a shortcut for slideOutHorizontally(tween(duration), targetOffsetX).

Parameters

duration

How long the slide runs.

targetOffsetX

Returns the target X offset in pixels. Defaults to sliding out to the start (-fullWidth).