androidx.compose.material3

LargeTopAppBar

Composable function

One of the top app bar types. It works like TopAppBar. Only the parameters that differ are described here.

Like MediumTopAppBar, with a bigger title.

A large top app bar
A large top app bar
// Top app bars have the same color as the page. The border only shows where the bar ends.
val barOutline @Composable get() = Modifier.width(360.dp).border(1.dp, MaterialTheme.colorScheme.outlineVariant)

LargeTopAppBar(
    title = { Text("Photos") },
    navigationIcon = { IconButton(onClick = {}) { Icon(Icons.AutoMirrored.Filled.ArrowBack, "Back") } },
    modifier = barOutline,
)

Parameters

@Composable
fun LargeTopAppBar(
    title: @Composable () -> Unit,
    modifier: Modifier = Modifier,
    navigationIcon: @Composable () -> Unit = {},
    actions: @Composable RowScope.() -> Unit = {},
    collapsedHeight: Dp = TopAppBarDefaults.LargeAppBarCollapsedHeight,
    expandedHeight: Dp = TopAppBarDefaults.LargeAppBarExpandedHeight,
    windowInsets: WindowInsets = TopAppBarDefaults.windowInsets,
    colors: TopAppBarColors = TopAppBarDefaults.topAppBarColors(),
    scrollBehavior: TopAppBarScrollBehavior? = null,
)

collapsedHeight: DpOptional

Default: TopAppBarDefaults.LargeAppBarCollapsedHeight

The height of a medium or large bar after it shrinks.

Defaults that differ from TopAppBar:

Same as in TopAppBar: title, modifier, navigationIcon, actions, expandedHeight, windowInsets, colors, scrollBehavior.

Top app bar types

See also