SpatialElevation

Functions summary

Unit
@Composable
SpatialElevation(elevation: Dp, content: @Composable () -> Unit)

Composable that creates a panel in 3D space when spatialization is enabled.

Functions

SpatialElevation

@Composable
fun SpatialElevation(
    elevation: Dp = SpatialElevationLevel.Level0,
    content: @Composable () -> Unit
): Unit

Composable that creates a panel in 3D space when spatialization is enabled.

SpatialElevation elevates content in-place. It uses the source position and constraints to determine the size and placement of the elevated panel while reserving space for the original element within the layout.

In non-spatial environments, the content is rendered normally without elevation.

SpatialElevation does not support a content lambda that has a width or height of zero.

Parameters
elevation: Dp = SpatialElevationLevel.Level0

the desired elevation level for the panel in spatial environments.

content: @Composable () -> Unit

the composable content to be displayed within the elevated panel.