fadeOut

fun Modifier.fadeOut(initialColor: Color = Color.Transparent, fadeToColor: Color = Color.White, verticalFade: Boolean = true): Modifier

Applies a fade effect over the content, drawing a gradient from an initial color to a final color. This can be used to create effects like text fading into the background.

Return

A Modifier that draws a gradient over the content.

Parameters

initialColor

The color at the start of the gradient. Defaults to Color.Transparent.

fadeToColor

The color at the end of the gradient. Defaults to Color.White.

verticalFade

If true, the gradient will be vertical (top to bottom). If false, it will be horizontal (left to right). Defaults to true.