Composable Function

Orbiter

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

Orbiter

Source set: Android
@Composable
public fun Orbiter(
    position: OrbiterPosition,
    shape: SpatialShape = OrbiterDefaults.Shape,
    content: @Composable @UiComposable () -> 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:

    androidx.xr.compose.subspace.SpatialPanel) is the parent.

  • Within a Subspace: the nearest parent spatial component (e.g.,
  • Within setContent: the main panel is the parent.

Parameters

position position of the orbiter relative to the parent spatial component, defined by its alignment, edge alignment, and offset
shape shape of the orbiter when rendered in 3D space
content content to display inside the orbiter
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: