shrinkHorizontally

@Stable
fun shrinkHorizontally(animationSpec: FiniteAnimationSpec<Dimension> = DEFAULT_SIZE_SPRING, shrinkTowards: Alignment.Horizontal = Alignment.End, clip: Boolean = true, targetWidth: (fullWidth: Int) -> Int = { 0 }): ExitTransition

Shrinks the width the content is given, from the content's full width to targetWidth, keeping the full height. The content is centered vertically.

Return

the exit transition.

Parameters

animationSpec

how the width travels, a medium-low stiffness spring by default.

shrinkTowards

the edge the width shrinks towards, the trailing one by default. Any alignment other than Alignment.Start and Alignment.End centers the content horizontally.

clip

whether to clip content to the animated space; true by default.

targetWidth

the width the content ends in, given its full width; 0 by default.