← Back to Compose UI
Creates a GraphicsLayerModifier that draws the shadow. The elevation defines the visual depth of the physical object. The physical object has a shape specified by shape.
Note that elevation is only affecting the shadow size and doesn't change the drawing order. Use zIndex modifier if you want to draw the elements with larger elevation after all the elements with a smaller one.
@Deprecated( "Use shadow instead", ReplaceWith( "shadow(elevation, shape, clip)", "androidx.compose.ui.draw" ) ) fun Modifier.drawShadow( elevation: Dp, shape: Shape = RectangleShape, clip: Boolean = elevation > 0.dp )
|The elevation for the shadow in pixels|
|Defines a shape of the physical object|
|When active, the content drawing clips to the shape|