shrinkVertically

@Stable
fun shrinkVertically(animationSpec: FiniteAnimationSpec<Dimension> = DEFAULT_SIZE_SPRING, shrinkTowards: Alignment.Vertical = Alignment.Bottom, clip: Boolean = true, targetHeight: (fullHeight: Int) -> Int = { 0 }): ExitTransition

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

Return

the exit transition.

Parameters

animationSpec

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

shrinkTowards

the edge the height shrinks towards, the bottom by default. Any alignment other than Alignment.Top and Alignment.Bottom centers the content vertically.

clip

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

targetHeight

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