Class

DepthEffect

The depth effect establishes a sense of hierarchy by using shadows to occlude content underneath.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Android
public class DepthEffect(public val layer1: Shadow, public val layer2: Shadow)

The depth effect establishes a sense of hierarchy by using shadows to occlude content underneath. It consists of two shadow layers, layer1 and layer2. layer2 is drawn on top of layer1: | | | | content | | | || | | __ | | | layer 2 | | | |___| | | | | | layer 1 | | | || | |_|

GlimmerTheme.depthEffectLevels provides theme defined depth effect levels that should be used to add depth to surfaces.

Higher level components apply the depth effect automatically when needed. The depth effect can also be configured through surface. To manually render depth shadows for advanced use-cases, see the depthEffect Modifier.