glow

fun Modifier.glow(glowingColor: Color, containerColor: Color = Color.White, cornerRadius: Dp = 0.dp, glowingRadius: Dp = 20.dp, glowAlpha: Float = 0.8f, offsetX: Dp = 0.dp, offsetY: Dp = 0.dp): Modifier

Applies a glowing effect around the composable.

This modifier draws a shadow layer behind the composable, creating a "glow" effect. The shape of the glow will match the rounded rectangle shape of the composable.

Return

A Modifier that applies the glow effect.

Parameters

glowingColor

The color of the glow.

containerColor

The color of the container itself. This is drawn to provide a surface for the shadow to appear behind. Defaults to Color.White.

cornerRadius

The corner radius for the rounded rectangle shape of both the container and the glow. Defaults to 0.dp for a sharp-cornered rectangle.

glowingRadius

The blur radius of the glow. A larger value will create a more spread-out and softer glow. Defaults to 20.dp.

glowAlpha

The alpha transparency of the glow. Defaults to 0.8f.

offsetX

The horizontal offset of the glow. A positive value shifts the glow to the right, a negative value to the left. Defaults to 0.dp.

offsetY

The vertical offset of the glow. A positive value shifts the glow downwards, a negative value upwards. Defaults to 0.dp.