androidx.compose.ui.draw
dropShadowSince 1.9
Function · from org.jetbrains.compose.ui:ui:1.12.2
No hand-written docs yet.
Draws a drop shadow behind the rest of the content with the geometry specified by the given shape and the shadow properties defined by the Shadow. This is different than Modifier.shadow as this does not introduce a graphicsLayer to render elevation based shadows. This shadow is rendered without a single light source and will render consistently regardless of the on screen position of the content.
With shadow
fun Modifier.dropShadow(shape: Shape, shadow: Shadow): Modifier
shape: ShapeRequired
shape: ShapeRequiredGeometry of the shadow
shadow: ShadowRequired
shadow: ShadowRequiredProperties of the shadow like radius, spread, offset, and fill properties like the color or brush
With block
fun Modifier.dropShadow(shape: Shape, block: DropShadowScope.() -> Unit)
block: DropShadowScope.() -> UnitRequired
block: DropShadowScope.() -> UnitRequiredDropShadowScope block where shadow properties are defined
Same as above: shape.
Library docs
Draws a drop shadow behind the rest of the content with the geometry specified by the given shape
and the shadow properties defined by the Shadow. This is different than Modifier.shadow as
this does not introduce a graphicsLayer to render elevation based shadows. This shadow is
rendered without a single light source and will render consistently regardless of the on screen
position of the content.