---
url: /foundations/xr/components/app-bars.md
description: Learn how Material 3 Expressive components adapt to extended reality devices
---

# XR components

Learn how Material 3 Expressive components adapt to extended reality devices

[Overview](overview.md) · **App bars** · [Dialogs](dialogs.md) · [Nav bar](nav-bar.md) · [Nav rail](nav-rail.md) · [Toolbars](toolbars.md)

::: info Note
XR guidelines are primarily intended for designers. Find what’s implemented in code in the [design kit](https://www.figma.com/community/file/1035203688168086460).
:::

Extended reality (XR) interfaces have special design requirements, like showing apps in 3D space. Material has an XR app bar with custom specs and guidance. See [XR developer documentation](https://developer.android.com/design/ui/xr/guides/foundations) for more details.

## Variants & configurations

There is one app bar [orbiter](https://developer.android.com/design/ui/xr/guides/spatial-ui#orbiters "Orbiters are floating elements that control the content within spatial panels."). It closely aligns with the [small app bar](../../../components/app-bars/overview.md "Small app bars display information and actions in compact layouts. They're often used for scrolled views on subpages that require back navigation and multiple actions."). It can be configured to be center-aligned or left-aligned.

![Center and left-aligned app bar orbiters.](/assets/80878a3e-mp5ntwab-01-3p.DqwdgLTd.webp)

1. Center-aligned app bar
2. Left-aligned app bar

<br>

## Anatomy

![Diagrams of app bar orbiters identifying 4 internal elements.](/assets/749020f5-mp5nuh2w-02-3p.DgfD-Ndo.webp)

1. Container
2. Headline
3. Trailing icons
4. Leading icon

<br>

## Color & elevation

XR uses color to communicate the elevation of UI elements and orbiters. With [spatial elevation](https://developer.android.com/design/ui/xr/guides/spatial-ui#spatial-elevation), the app bar displays above the [spatial panel](https://developer.android.com/design/ui/xr/guides/spatial-ui#spatial-panels "In Android XR, a spatial panel is a container for UI elements, interactive components, and immersive content.") on the Z-axis. Elevated app bars can use any of these color options:

![3 versions of app bar elevation color strategy.](/assets/ed165394-mp5nuy7e-03-3p.20YKSA4-.webp)

1. Surface container
2. Surface container high
3. Surface container highest

## Measurements

![Diagrams with measurements and padding for app bar orbiters.](/assets/5580d233-mq7w2v1g-04-3p.M1Cs-Dy1.webp)

Measurements and padding for app bar orbiters

## Usage

An app bar can appear in an [orbiter](https://developer.android.com/design/ui/xr/guides/spatial-ui#orbiters "Orbiters are floating elements that control the content within spatial panels.") for a more immersive experience. Currently, this spatial capability is only available in [full space](https://developer.android.com/design/ui/xr/guides/foundations#modes "Full space is Android XR’s immersive mode and supports spatial components."). In [home space](https://developer.android.com/design/ui/xr/guides/foundations#modes "Home space is compatible with mobile and large screen apps, but doesn’t support spatial components."), use a regular app bar on the same plane as the body content to mimic a 2D experience.

<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Fmowvrdts-XR_Top-App-Bar_Usage_01_IA_v03%20(1).mp4?alt=media" aria-label="Animation showing an app bar changing from 2D to 3D."></video>

An app bar’s behavior and placement changes from a 2D to a 3D experience

## Behavior

### Global context

When placed in global context, the orbiter is centered at the top of the app it controls. 

It stays anchored to the app during layout or content changes. 

This ensures navigation elements are always easy to find and use.

<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Fmowvuyn4-XR_Top-App-Bar_Behavior_01_IA_v03%20(1).mp4?alt=media" aria-label="An app bar orbiter placed in global context."></video>

Global app bar orbiters should be centered and anchored to the top of the app

### Local context

When placed in local context, the orbiter is centered at the top of the spatial panel it controls. 

It repositions in response to layout or content changes.

::: warning Caution
<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Fmowvzhjn-XR_Top-App-Bar_Behavior_02_IA_v03%20(1).mp4?alt=media" aria-label="An app bar orbiter placed in local context."></video>

Local app bar orbiters should be centered and anchored to the top of the panel. However, this is less common, so make sure that it contains actions that only affect its anchored panel.
:::

### Additional app bars

In most cases, apps should only have one app bar orbiter, placed in global context.

::: warning Caution
<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Fmoww3e8a-XR_Top-App-Bar_Behavior_03_IA_v03%20(1).mp4?alt=media" aria-label="An app switches between 1 and 2 app bar orbiters."></video>

Limit the use of multiple app bars to rare cases when additional spatialization improves usability
:::

## Placement

### Offset & inset positioning

In full space, an app bar orbiter can be positioned:

* Offset 20dp from the spatial panel
* Inset 12dp, overlapping spatial panel without obstructing content

::: tip Do
![App bar orbiter with offset positioning.](/assets/fda624b0-mowwbs16-09.DQNI27we.webp)

An app bar orbiter with a 20dp offset creates visual separation from the spatial panel
:::

::: danger Don't
![App bar orbiter with inset positioning that obstructs content..](/assets/83620784-mowwe02f-10.Hjvm_ynZ.webp)

Don’t overlap the app bar orbiter and spatial panel more than 12dp
:::

### Horizontal alignment

::: tip Do
![An app bar orbiter placed within the bounds of its spatial panel.](/assets/fda624b0-mowwbs16-09.DQNI27we.webp)

Always align the app bar orbiter within the bounds of nearby spatial panels
:::

::: danger Don't
![An app bar orbiter that extends beyond the width of its spatial panel.](/assets/5d8d55d0-mowwgpq6-12.DkcrD4Tt.webp)

The app bar orbiter shouldn’t exceed the width of adjacent spatial panels
:::

### Spatial panel alignment

By default, app bar orbiters are center-aligned to the spatial panel. Their width and placement can be adjusted to accommodate specific user needs, such as improved ergonomics or [right-to-left (RTL) languages](../../layout/bidirectionality-rtl.md).

<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Fmowxpzvt-XR_Top-App-Bar_Spatial-pane-alignment_01_IA_v03%20(1).mp4?alt=media" aria-label="App bar orbiter alignment options in relation to spatial panels: left, center, and right-aligned."></video>

App bar orbiters can align to the center, left, or right of the spatial panel

### Width boundaries

An app bar orbiter’s width should adjust to stay in a person’s [field of view](https://developer.android.com/design/ui/xr/guides/spatial-ui#where-place). 

This makes crucial navigation elements easy to find.

::: tip Do
![An app bar orbiter with a width that fits in a person’s field of view.](/assets/ec1f5fe1-mowy6885-14.D4-sXvz1.webp)

Adjust the width of the app bar orbiter to fit in a person’s field of view
:::

It’s not recommended to increase the width of an app bar orbiter beyond a person’s natural [field of view](https://developer.android.com/design/ui/xr/guides/spatial-ui#where-place). 

This creates a visual imbalance and makes it difficult to find navigation elements.

::: danger Don't
![An app bar orbiter that exceeds the panel’s width and a person’s field of view.](/assets/887ff76c-mowy73ja-15.BstBkhzg.webp)

Avoid expanding the app bar orbiter beyond the adjacent panel’s width and a person’s field of view
:::

### Adaptable width

When placed in a local context, an app bar orbiter can expand to the width of its adjacent spatial panel.   

Be sure the orbiter stays in a person’s field of view, and test for usability.

::: warning Caution
<video controls src="https://firebasestorage.googleapis.com/v0/b/design-spec/o/projects%2Fgoogle-material-3%2Fimages%2Fmp1yzz8i-XR_Top-App-Bar_Adaptable-width_01_IA_v03.mp4?alt=media" aria-label="2 app bar orbiters with the same width as their adjacent spatial panels."></video>

Use caution before expanding the app bar’s width to match its spatial panel. The orbiter may not fit in a person’s primary field of view.
:::

## Accessibility considerations

[XR accessibility](../design/accessibility.md) guidelines are still evolving. XR app bars should follow applicable Material [app bar accessibility standards](../../../components/app-bars/accessibility.md).
