shadow

fun Modifier.shadow(color: Color = Color.Black, offsetX: Dp = 0.dp, offsetY: Dp = 0.dp, blurRadius: Dp = 0.dp): Modifier

Draws a shadow behind the content.

Return

A Modifier that draws the shadow behind the content.

Parameters

color

The color of the shadow.

offsetX

The horizontal offset of the shadow.

offsetY

The vertical offset of the shadow.

blurRadius

The blur radius of the shadow.


fun Modifier.shadow(spread: Dp = 8.dp, @FloatRange(from = 0.0, to = 1.0) alpha: Float = 0.25f, color: Color = Color.Gray, radius: Dp = 8.dp): Modifier

A workaround for custom colored shadow.