<h2 id="spatialelevation-elevation-content">SpatialElevation</h2>

<div class='sourceset sourceset-android'>Android</div>

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

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

[SpatialElevation](/jetpack-compose/androidx.xr.compose/compose/composable-functions/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 | the desired elevation level for the panel in spatial environments. |
| content | the composable content to be displayed within the elevated panel. |