Compose Component

SpatialTopAppBar

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

SpatialTopAppBar

Source set: Android
@Composable
public 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,
)

Parameters

title the title to be displayed in the top app bar
modifier the Modifier to be applied to this top app bar
navigationIcon optional navigation icon to be displayed at the start of the top app bar
actions optional actions to be displayed at the end of the top app bar
windowInsets a window insets of the top app bar
colors TopAppBarColors that will be used to resolve the colors used for this top app bar
scrollBehavior a TopAppBarScrollBehavior
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: