androidx.compose.ui.draw
innerShadowSince 1.9
Function · from org.jetbrains.compose.ui:ui:1.12.2
No hand-written docs yet.
Draws an inner shadow on top of 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. Additionally this shadow will render only within the geometry and can be used to provide a recessed like visual effect. 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.innerShadow(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.innerShadow(shape: Shape, block: InnerShadowScope.() -> Unit): Modifier
block: InnerShadowScope.() -> UnitRequired
block: InnerShadowScope.() -> UnitRequiredInnerShadowScope block where shadow properties are defined
Same as above: shape.
Library docs
Draws an inner shadow on top of 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. Additionally this
shadow will render only within the geometry and can be used to provide a recessed like visual
effect. This shadow is rendered without a single light source and will render consistently
regardless of the on screen position of the content.