# SpatialTopAppBar

## Functions summary

|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/xr/compose/material3/ExperimentalMaterial3XrApi @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/xr/compose/material3/SpatialTopAppBar.composable#SpatialTopAppBar(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Function0,kotlin.Function1,androidx.compose.foundation.layout.WindowInsets,androidx.compose.material3.TopAppBarColors,androidx.compose.material3.TopAppBarScrollBehavior)( title: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, navigationIcon: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html, actions: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/RowScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html, windowInsets: https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/WindowInsets, colors: https://developer.android.com/reference/kotlin/androidx/compose/material3/TopAppBarColors, scrollBehavior: https://developer.android.com/reference/kotlin/androidx/compose/material3/TopAppBarScrollBehavior? )` XR-specific SingleRowTopAppBar that displays a single-row top app bar inside a top-aligned `Orbiter`. |

## Functions

### SpatialTopAppBar

Artifact: [androidx.xr.compose.material3:material3](https://developer.android.com/jetpack/androidx/releases/xr-compose-material3) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/material3/AppBar.kt+function:SpatialTopAppBar)

```
@ExperimentalMaterial3XrApi
@Composable
fun SpatialTopAppBar(
    title: @Composable () -> Unit,
    modifier: Modifier = Modifier,
    navigationIcon: @Composable () -> Unit = {},
    actions: @Composable RowScope.() -> Unit = {},
    windowInsets: WindowInsets = TopAppBarDefaults.windowInsets,
    colors: TopAppBarColors = TopAppBarDefaults.topAppBarColors(),
    scrollBehavior: TopAppBarScrollBehavior? = null
): Unit
```

XR-specific SingleRowTopAppBar that displays a single-row top app bar inside a top-aligned `Orbiter`.

| Parameters |
|---|---|
| `title: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | the title to be displayed in the top app bar |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | the `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` to be applied to this top app bar |
| `navigationIcon: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html = {}` | optional navigation icon to be displayed at the start of the top app bar |
| `actions: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/RowScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html = {}` | optional actions to be displayed at the end of the top app bar |
| `windowInsets: https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/WindowInsets = TopAppBarDefaults.windowInsets` | a window insets of the top app bar |
| `colors: https://developer.android.com/reference/kotlin/androidx/compose/material3/TopAppBarColors = TopAppBarDefaults.topAppBarColors()` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/TopAppBarColors` that will be used to resolve the colors used for this top app bar |
| `scrollBehavior: https://developer.android.com/reference/kotlin/androidx/compose/material3/TopAppBarScrollBehavior? = null` | a `https://developer.android.com/reference/kotlin/androidx/compose/material3/TopAppBarScrollBehavior` |