# SpatialElevation

## Functions summary

|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/SpatialElevation.composable#SpatialElevation(androidx.compose.ui.unit.Dp,kotlin.Function0)(elevation: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Composable that creates a panel in 3D space when spatialization is enabled. |

## Functions

### SpatialElevation

Artifact: [androidx.xr.compose:compose](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/spatial/SpatialElevation.kt+function:SpatialElevation) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

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

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

`https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/SpatialElevation.composable#SpatialElevation(androidx.compose.ui.unit.Dp,kotlin.Function0)` 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 `https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/package-summary#SpatialElevation(androidx.compose.ui.unit.Dp,kotlin.Function0)` lambda that has a width or height of zero.

| Parameters |
|---|---|
| `elevation: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = SpatialElevationLevel.Level0` | the desired elevation level for the panel in spatial environments. |
| `content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | the composable content to be displayed within the elevated panel. |