# Orbiter

## 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/compose/runtime/ComposableOpenTarget(index = -1) [Orbiter](https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/Orbiter.composable#Orbiter(androidx.xr.compose.spatial.OrbiterAlignment,androidx.xr.compose.subspace.layout.SpatialShape,kotlin.Function0))( alignment: https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/OrbiterAlignment, shape: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialShape, content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable @https://developer.android.com/reference/kotlin/androidx/compose/ui/UiComposable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` **This function is deprecated.** Use the OrbiterPosition-based Orbiter instead. |
| `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/compose/runtime/ComposableOpenTarget(index = -1) [Orbiter](https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/Orbiter.composable#Orbiter(androidx.xr.compose.spatial.OrbiterPoseProvider,androidx.xr.compose.subspace.layout.SpatialShape,kotlin.Function0))( poseProvider: https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/OrbiterPoseProvider, shape: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialShape, content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable @https://developer.android.com/reference/kotlin/androidx/compose/ui/UiComposable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` **This function is deprecated.** Use the OrbiterPosition-based Orbiter instead. |
| `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/compose/runtime/ComposableOpenTarget(index = -1) https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/Orbiter.composable#Orbiter(androidx.xr.compose.spatial.OrbiterPosition,androidx.xr.compose.subspace.layout.SpatialShape,kotlin.Function0)( position: https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/OrbiterPosition, shape: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialShape, content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable @https://developer.android.com/reference/kotlin/androidx/compose/ui/UiComposable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` A composable that creates an orbiter along the edge or center of a parent spatial component. |
| `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/compose/runtime/ComposableOpenTarget(index = -1) [Orbiter](https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/Orbiter.composable#Orbiter(androidx.xr.compose.spatial.OrbiterAnchorPoint,androidx.xr.compose.unit.DpVolumeOffset,androidx.xr.compose.subspace.layout.SpatialShape,kotlin.Function0))( anchorPoint: https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/OrbiterAnchorPoint, offset: https://developer.android.com/reference/kotlin/androidx/xr/compose/unit/DpVolumeOffset, shape: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialShape, content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable @https://developer.android.com/reference/kotlin/androidx/compose/ui/UiComposable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` **This function is deprecated.** Use the OrbiterPosition-based Orbiter instead. |
| `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/compose/runtime/ComposableOpenTarget(index = -1) [Orbiter](https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/Orbiter.composable#Orbiter(androidx.xr.compose.spatial.ContentEdge.Horizontal,androidx.compose.ui.unit.Dp,androidx.xr.compose.spatial.OrbiterOffsetType,androidx.compose.ui.Alignment.Horizontal,androidx.xr.compose.subspace.layout.SpatialShape,androidx.compose.ui.unit.Dp,kotlin.Boolean,kotlin.Function0))( position: https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/ContentEdge.Horizontal, offset: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, offsetType: https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/OrbiterOffsetType, alignment: https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment.Horizontal, shape: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialShape, elevation: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, shouldRenderInNonSpatial: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable @https://developer.android.com/reference/kotlin/androidx/compose/ui/UiComposable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` **This function is deprecated.** Use the OrbiterPosition-based Orbiter instead. |
| `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/compose/runtime/ComposableOpenTarget(index = -1) [Orbiter](https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/Orbiter.composable#Orbiter(androidx.xr.compose.spatial.ContentEdge.Vertical,androidx.compose.ui.unit.Dp,androidx.xr.compose.spatial.OrbiterOffsetType,androidx.compose.ui.Alignment.Vertical,androidx.xr.compose.subspace.layout.SpatialShape,androidx.compose.ui.unit.Dp,kotlin.Boolean,kotlin.Function0))( position: https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/ContentEdge.Vertical, offset: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, offsetType: https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/OrbiterOffsetType, alignment: https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment.Vertical, shape: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialShape, elevation: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, shouldRenderInNonSpatial: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable @https://developer.android.com/reference/kotlin/androidx/compose/ui/UiComposable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` **This function is deprecated.** Use the OrbiterPosition-based Orbiter instead. |

## Functions

### Orbiter

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/Orbiter.kt+function:Orbiter) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02) Deprecated in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@Composable
@ComposableOpenTarget(index = -1)
fun [Orbiter](https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/Orbiter.composable#Orbiter(androidx.xr.compose.spatial.OrbiterAlignment,androidx.xr.compose.subspace.layout.SpatialShape,kotlin.Function0))(
    alignment: OrbiterAlignment,
    shape: SpatialShape = OrbiterDefaults.Shape,
    content: @Composable @UiComposable () -> Unit
): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Use the OrbiterPosition-based Orbiter instead.

### Orbiter

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/Orbiter.kt+function:Orbiter) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02) Deprecated in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@Composable
@ComposableOpenTarget(index = -1)
fun [Orbiter](https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/Orbiter.composable#Orbiter(androidx.xr.compose.spatial.OrbiterPoseProvider,androidx.xr.compose.subspace.layout.SpatialShape,kotlin.Function0))(
    poseProvider: OrbiterPoseProvider,
    shape: SpatialShape = OrbiterDefaults.Shape,
    content: @Composable @UiComposable () -> Unit
): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Use the OrbiterPosition-based Orbiter instead.

A composable that creates an orbiter along the edge of a spatial component (e.g. `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/SpatialPanel.composable#SpatialPanel(androidx.xr.compose.subspace.layout.SubspaceModifier,androidx.xr.compose.subspace.layout.SpatialShape,androidx.xr.compose.subspace.layout.InteractionPolicy,kotlin.Function0)`).

Orbiters are floating elements that are typically used to control the content within spatial panels and other entities that they're anchored to. They allow the content to have more space and give users quick access to features like navigation without obstructing the main content.

The size of the `Orbiter` is constrained by the dimensions of its spatial parent. The spatial parent of the Orbiter is determined based on where the Orbiter is declared. When the orbiter is declared within:

- A `https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/Subspace.composable#Subspace(androidx.xr.compose.subspace.layout.SubspaceModifier,kotlin.Function1)`, the nearest spatial component (e.g. `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/SpatialRow.composable#SpatialRow(androidx.xr.compose.subspace.layout.SubspaceModifier,androidx.xr.compose.subspace.layout.SpatialAlignment.Vertical,androidx.xr.compose.subspace.layout.SpatialAlignment.Depth,androidx.xr.compose.subspace.layout.SpatialArrangement.Horizontal,kotlin.Function1)`, `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/SpatialPanel.composable#SpatialPanel(androidx.xr.compose.subspace.layout.SubspaceModifier,androidx.xr.compose.subspace.layout.SpatialShape,androidx.xr.compose.subspace.layout.InteractionPolicy,kotlin.Function0)`) is the spatial parent

- `setContent`, the main panel is the spatial parent

Orbiters do not participate in their parent's layout and have no layout nodes in the containing compose hierarchy.

| Parameters |
|---|---|
| `poseProvider: https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/OrbiterPoseProvider` | A pose provider for calculating the offset pose of the orbiter relative to its spatial parent. |
| `shape: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialShape = OrbiterDefaults.Shape` | The shape of this Orbiter when it is rendered in 3D space. |
| `content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable @https://developer.android.com/reference/kotlin/androidx/compose/ui/UiComposable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | The content of the orbiter. |

### Orbiter

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/Orbiter.kt+function:Orbiter) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@Composable
@ComposableOpenTarget(index = -1)
fun Orbiter(
    position: OrbiterPosition,
    shape: SpatialShape = OrbiterDefaults.Shape,
    content: @Composable @UiComposable () -> Unit
): Unit
```

A composable that creates an orbiter along the edge or center of a parent spatial component.

Orbiters are floating elements that are typically used to control the content within spatial panels and other entities that they're anchored to. They allow the content to have more space and give users quick access to features like navigation without obstructing the main content.

Sizing constraints depend on where the orbiter is declared:

- Within a `https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/Subspace.composable#Subspace(androidx.xr.compose.subspace.layout.SubspaceModifier,kotlin.Function1)`: the nearest parent spatial component (e.g., `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/SpatialPanel.composable#SpatialPanel(androidx.xr.compose.subspace.layout.SubspaceModifier,androidx.xr.compose.subspace.layout.SpatialShape,androidx.xr.compose.subspace.layout.InteractionPolicy,kotlin.Function0)`) is the parent.

- Within `setContent`: the main panel is the parent.

```kotlin
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.size
import androidx.compose.material3.Text
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.xr.compose.spatial.Orbiter
import androidx.xr.compose.spatial.OrbiterDefaults
import androidx.xr.compose.spatial.OrbiterPosition
import androidx.xr.compose.spatial.OrbiterPosition.EdgeAlignment
import androidx.xr.compose.subspace.SpatialPanel
import androidx.xr.compose.subspace.layout.SubspaceModifier
import androidx.xr.compose.subspace.layout.height
import androidx.xr.compose.subspace.layout.width
import androidx.xr.compose.unit.DpVolumeOffset

SpatialPanel(SubspaceModifier.width(400.dp).height(300.dp)) {
    // Place a horizontal bar orbiter at the bottom-center edge of the panel.
    Orbiter(
        position =
            OrbiterPosition.BottomCenter(
                offset = DpVolumeOffset(x = 0.dp, y = 0.dp, z = OrbiterDefaults.Elevation),
                verticalEdgeAlignment = EdgeAlignment.Center,
            )
    ) {
        Box(
            modifier = Modifier.size(200.dp, 64.dp).background(Color.DarkGray),
            contentAlignment = Alignment.Center,
        ) {
            Text("Bottom Bar", color = Color.White, fontSize = 18.sp)
        }
    }
}
```

```kotlin
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.size
import androidx.compose.material3.Text
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.xr.compose.spatial.Orbiter
import androidx.xr.compose.spatial.OrbiterDefaults
import androidx.xr.compose.spatial.OrbiterPosition
import androidx.xr.compose.spatial.OrbiterPosition.EdgeAlignment
import androidx.xr.compose.subspace.SpatialPanel
import androidx.xr.compose.subspace.layout.SubspaceModifier
import androidx.xr.compose.subspace.layout.height
import androidx.xr.compose.subspace.layout.width
import androidx.xr.compose.unit.DpVolumeOffset

SpatialPanel(SubspaceModifier.width(400.dp).height(300.dp)) {
    // Place the orbiter at the top-start corner: horizontally aligned inside the left edge,
    // but vertically sitting completely above (outside) the top edge.
    Orbiter(
        position =
            OrbiterPosition.TopStart(
                offset = DpVolumeOffset(x = 0.dp, y = 0.dp, z = OrbiterDefaults.Elevation),
                horizontalEdgeAlignment = EdgeAlignment.Inside,
                verticalEdgeAlignment = EdgeAlignment.Outside,
            )
    ) {
        Box(
            modifier = Modifier.size(200.dp, 64.dp).background(Color.DarkGray),
            contentAlignment = Alignment.Center,
        ) {
            Text("Top Rail", color = Color.White, fontSize = 18.sp)
        }
    }
}
```

```kotlin
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.size
import androidx.compose.material3.Text
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.xr.compose.spatial.Orbiter
import androidx.xr.compose.spatial.OrbiterDefaults
import androidx.xr.compose.spatial.OrbiterPosition
import androidx.xr.compose.spatial.OrbiterPosition.EdgeAlignment
import androidx.xr.compose.subspace.SpatialPanel
import androidx.xr.compose.subspace.layout.SubspaceModifier
import androidx.xr.compose.subspace.layout.height
import androidx.xr.compose.subspace.layout.width
import androidx.xr.compose.unit.DpVolumeOffset

SpatialPanel(SubspaceModifier.width(400.dp).height(300.dp)) {
    // Place the orbiter at the top-start corner: horizontally sitting completely to the side
    // (outside) of the left edge, but vertically aligned inside the top boundary.
    Orbiter(
        position =
            OrbiterPosition.TopStart(
                offset = DpVolumeOffset(x = 0.dp, y = 0.dp, z = OrbiterDefaults.Elevation),
                horizontalEdgeAlignment = EdgeAlignment.Outside,
                verticalEdgeAlignment = EdgeAlignment.Inside,
            )
    ) {
        Box(
            modifier = Modifier.size(64.dp, 200.dp).background(Color.DarkGray),
            contentAlignment = Alignment.Center,
        ) {
            Text("Rail", color = Color.White, fontSize = 18.sp)
        }
    }
}
```

| Parameters |
|---|---|
| `position: https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/OrbiterPosition` | position of the orbiter relative to the parent spatial component, defined by its alignment, edge alignment, and offset |
| `shape: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialShape = OrbiterDefaults.Shape` | shape of the orbiter when rendered in 3D space |
| `content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable @https://developer.android.com/reference/kotlin/androidx/compose/ui/UiComposable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | content to display inside the orbiter |

### Orbiter

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/Orbiter.kt+function:Orbiter) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02) Deprecated in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@Composable
@ComposableOpenTarget(index = -1)
fun [Orbiter](https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/Orbiter.composable#Orbiter(androidx.xr.compose.spatial.OrbiterAnchorPoint,androidx.xr.compose.unit.DpVolumeOffset,androidx.xr.compose.subspace.layout.SpatialShape,kotlin.Function0))(
    anchorPoint: OrbiterAnchorPoint,
    offset: DpVolumeOffset = DpVolumeOffset(0.dp, 0.dp, OrbiterDefaults.Elevation),
    shape: SpatialShape = OrbiterDefaults.Shape,
    content: @Composable @UiComposable () -> Unit
): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Use the OrbiterPosition-based Orbiter instead.

A composable that creates an orbiter along the edge of a spatial component (e.g. `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/SpatialPanel.composable#SpatialPanel(androidx.xr.compose.subspace.layout.SubspaceModifier,androidx.xr.compose.subspace.layout.SpatialShape,androidx.xr.compose.subspace.layout.InteractionPolicy,kotlin.Function0)`).

Orbiters are floating elements that are typically used to control the content within spatial panels and other entities that they're anchored to. They allow the content to have more space and give users quick access to features like navigation without obstructing the main content.

The size of the `Orbiter` is constrained by the dimensions of its spatial parent. The spatial parent of the Orbiter is determined based on where the Orbiter is declared. When the orbiter is declared within:

- A `https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/Subspace.composable#Subspace(androidx.xr.compose.subspace.layout.SubspaceModifier,kotlin.Function1)`, the nearest spatial component (e.g. `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/SpatialRow.composable#SpatialRow(androidx.xr.compose.subspace.layout.SubspaceModifier,androidx.xr.compose.subspace.layout.SpatialAlignment.Vertical,androidx.xr.compose.subspace.layout.SpatialAlignment.Depth,androidx.xr.compose.subspace.layout.SpatialArrangement.Horizontal,kotlin.Function1)`, `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/SpatialPanel.composable#SpatialPanel(androidx.xr.compose.subspace.layout.SubspaceModifier,androidx.xr.compose.subspace.layout.SpatialShape,androidx.xr.compose.subspace.layout.InteractionPolicy,kotlin.Function0)`) is the spatial parent

- `setContent`, the main panel is the spatial parent

| Parameters |
|---|---|
| `anchorPoint: https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/OrbiterAnchorPoint` | The anchored position of the orbiter relative to the spatial component it is anchored to. `https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/OrbiterAnchorPoint` is `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection` aware. |
| `offset: https://developer.android.com/reference/kotlin/androidx/xr/compose/unit/DpVolumeOffset = DpVolumeOffset(0.dp, 0.dp, OrbiterDefaults.Elevation)` | The offset of the orbiter based on the outer edge of the orbiter. |
| `shape: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialShape = OrbiterDefaults.Shape` | The shape of this Orbiter when it is rendered in 3D space. |
| `content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable @https://developer.android.com/reference/kotlin/androidx/compose/ui/UiComposable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | The content of the orbiter. |

### Orbiter

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/Orbiter.kt+function:Orbiter) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02) Deprecated in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@Composable
@ComposableOpenTarget(index = -1)
fun [Orbiter](https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/Orbiter.composable#Orbiter(androidx.xr.compose.spatial.ContentEdge.Horizontal,androidx.compose.ui.unit.Dp,androidx.xr.compose.spatial.OrbiterOffsetType,androidx.compose.ui.Alignment.Horizontal,androidx.xr.compose.subspace.layout.SpatialShape,androidx.compose.ui.unit.Dp,kotlin.Boolean,kotlin.Function0))(
    position: ContentEdge.Horizontal,
    offset: Dp = 0.dp,
    offsetType: OrbiterOffsetType = OrbiterOffsetType.OuterEdge,
    alignment: Alignment.Horizontal = Alignment.CenterHorizontally,
    shape: SpatialShape = OrbiterDefaults.Shape,
    elevation: Dp = OrbiterDefaults.Elevation,
    shouldRenderInNonSpatial: Boolean = true,
    content: @Composable @UiComposable () -> Unit
): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Use the OrbiterPosition-based Orbiter instead.

A composable that creates an orbiter along the top or bottom edges of a view.

Orbiters are floating elements that are typically used to control the content within spatial panels and other entities that they're anchored to. They allow the content to have more space and give users quick access to features like navigation without obstructing the main content.

The size of the `https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/Orbiter.composable#Orbiter(androidx.xr.compose.spatial.ContentEdge.Horizontal,androidx.compose.ui.unit.Dp,androidx.xr.compose.spatial.OrbiterOffsetType,androidx.compose.ui.Alignment.Horizontal,androidx.xr.compose.subspace.layout.SpatialShape,androidx.compose.ui.unit.Dp,kotlin.Boolean,kotlin.Function0)` is constrained by the dimensions of the parent spatial component it is anchored to (e.g., a `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/SpatialPanel.composable#SpatialPanel(androidx.xr.compose.subspace.layout.SubspaceModifier,androidx.xr.compose.subspace.layout.SpatialShape,androidx.xr.compose.subspace.layout.InteractionPolicy,kotlin.Function0)`). If it's not placed within a specific spatial component, it defaults to the main window's size. Consequently, an `https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/Orbiter.composable#Orbiter(androidx.xr.compose.spatial.ContentEdge.Horizontal,androidx.compose.ui.unit.Dp,androidx.xr.compose.spatial.OrbiterOffsetType,androidx.compose.ui.Alignment.Horizontal,androidx.xr.compose.subspace.layout.SpatialShape,androidx.compose.ui.unit.Dp,kotlin.Boolean,kotlin.Function0)`'s content cannot be larger than its parent's dimensions.

| Parameters |
|---|---|
| `position: https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/ContentEdge.Horizontal` | The edge of the orbiter. Use `https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/ContentEdge#Top()` or `https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/ContentEdge#Bottom()`. |
| `offset: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = 0.dp` | The offset of the orbiter based on the outer edge of the orbiter. |
| `offsetType: https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/OrbiterOffsetType = OrbiterOffsetType.OuterEdge` | The type of offset used for positioning the orbiter. |
| `alignment: https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment.Horizontal = Alignment.CenterHorizontally` | The alignment of the orbiter. Use `https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment#CenterHorizontally()` or `https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment#Start()` or `https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment#End()`. |
| `shape: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialShape = OrbiterDefaults.Shape` | The shape of this Orbiter when it is rendered in 3D space. |
| `elevation: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = OrbiterDefaults.Elevation` | The z-direction elevation level of this Orbiter. |
| `shouldRenderInNonSpatial: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | In a non-spatial environment, if `true` the orbiter content is rendered as if the orbiter wrapper was not present and removed from the flow otherwise. In spatial environments, this flag is ignored. |
| `content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable @https://developer.android.com/reference/kotlin/androidx/compose/ui/UiComposable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | The content of the orbiter. Example: ```kotlin Orbiter(position = ContentEdge.Top, offset = 10.dp) { Text("This is a top edge Orbiter") } ``` |

### Orbiter

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/Orbiter.kt+function:Orbiter) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02) Deprecated in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@Composable
@ComposableOpenTarget(index = -1)
fun [Orbiter](https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/Orbiter.composable#Orbiter(androidx.xr.compose.spatial.ContentEdge.Vertical,androidx.compose.ui.unit.Dp,androidx.xr.compose.spatial.OrbiterOffsetType,androidx.compose.ui.Alignment.Vertical,androidx.xr.compose.subspace.layout.SpatialShape,androidx.compose.ui.unit.Dp,kotlin.Boolean,kotlin.Function0))(
    position: ContentEdge.Vertical,
    offset: Dp = 0.dp,
    offsetType: OrbiterOffsetType = OrbiterOffsetType.OuterEdge,
    alignment: Alignment.Vertical = Alignment.CenterVertically,
    shape: SpatialShape = OrbiterDefaults.Shape,
    elevation: Dp = OrbiterDefaults.Elevation,
    shouldRenderInNonSpatial: Boolean = true,
    content: @Composable @UiComposable () -> Unit
): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Use the OrbiterPosition-based Orbiter instead.

A composable that creates an orbiter along the start or end edges of a view.

Orbiters are floating elements that are typically used to control the content within spatial panels and other entities that they're anchored to. They allow the content to have more space and give users quick access to features like navigation without obstructing the main content.

The size of the `https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/Orbiter.composable#Orbiter(androidx.xr.compose.spatial.ContentEdge.Vertical,androidx.compose.ui.unit.Dp,androidx.xr.compose.spatial.OrbiterOffsetType,androidx.compose.ui.Alignment.Vertical,androidx.xr.compose.subspace.layout.SpatialShape,androidx.compose.ui.unit.Dp,kotlin.Boolean,kotlin.Function0)` is constrained by the dimensions of the parent spatial component it is anchored to (e.g., a `https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/SpatialPanel.composable#SpatialPanel(androidx.xr.compose.subspace.layout.SubspaceModifier,androidx.xr.compose.subspace.layout.SpatialShape,androidx.xr.compose.subspace.layout.InteractionPolicy,kotlin.Function0)`). If it's not placed within a specific spatial component, it defaults to the main window's size. Consequently, an `https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/Orbiter.composable#Orbiter(androidx.xr.compose.spatial.ContentEdge.Vertical,androidx.compose.ui.unit.Dp,androidx.xr.compose.spatial.OrbiterOffsetType,androidx.compose.ui.Alignment.Vertical,androidx.xr.compose.subspace.layout.SpatialShape,androidx.compose.ui.unit.Dp,kotlin.Boolean,kotlin.Function0)`'s content cannot be larger than its parent's dimensions.

| Parameters |
|---|---|
| `position: https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/ContentEdge.Vertical` | The edge of the orbiter. Use `https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/ContentEdge#Start()` or `https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/ContentEdge#End()`. |
| `offset: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = 0.dp` | The offset of the orbiter based on the outer edge of the orbiter. |
| `offsetType: https://developer.android.com/reference/kotlin/androidx/xr/compose/spatial/OrbiterOffsetType = OrbiterOffsetType.OuterEdge` | The type of offset used for positioning the orbiter. |
| `alignment: https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment.Vertical = Alignment.CenterVertically` | The alignment of the orbiter. Use `https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment#CenterVertically()` or `https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment#Top()` or `https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment#Bottom()`. |
| `shape: https://developer.android.com/reference/kotlin/androidx/xr/compose/subspace/layout/SpatialShape = OrbiterDefaults.Shape` | The shape of this Orbiter when it is rendered in 3D space. |
| `elevation: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = OrbiterDefaults.Elevation` | The z-direction elevation level of this Orbiter. |
| `shouldRenderInNonSpatial: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | In a non-spatial environment, if `true` the orbiter content is rendered as if the orbiter wrapper was not present and removed from the flow otherwise. In spatial environments, this flag is ignored. |
| `content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable @https://developer.android.com/reference/kotlin/androidx/compose/ui/UiComposable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | The content of the orbiter. Example: ```kotlin Orbiter(position = ContentEdge.Start, offset = 10.dp) { Text("This is a start edge Orbiter") } ``` |