Function

fadeOut

This fades out the content of the transition, from full opacity to the specified target alpha (i.e.

fadeOut

Source set: Common
public fun fadeOut(
    animationSpec: FiniteAnimationSpec<Float> = spring(stiffness = Spring.StiffnessMediumLow),
    targetAlpha: Float = 0f,
): ExitTransition

This fades out the content of the transition, from full opacity to the specified target alpha (i.e. targetAlpha), using the supplied animationSpec. By default, the content will be faded out to fully transparent (i.e. targetAlpha defaults to 0), and animationSpec uses spring by default.

Parameters

animationSpec the FiniteAnimationSpec for this animation, spring by default
targetAlpha the target alpha of the exit transition, 0f by default
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: