StylishCenterAlignedTopAppBar

fun StylishCenterAlignedTopAppBar(title: @Composable () -> Unit, modifier: Modifier = Modifier, navigationIcon: @Composable () -> Unit? = null, actions: @Composable RowScope.() -> Unit = {}, windowInsets: WindowInsets = TopAppBarDefaults.windowInsets, colors: TopAppBarColors = stylishTopAppBarColors(), scrollBehavior: TopAppBarScrollBehavior? = null, titleContentColor: Color? = null, navigationIconContentColor: Color? = null, actionIconContentColor: Color? = null)

A center-aligned Material 3 top app bar with Stylish theme defaults.

The title is horizontally centered between navigationIcon and actions. This is the Material-parity variant of StylishTopAppBar for screens that center their title; it wraps CenterAlignedTopAppBar with Stylish container colors (surfaceContainerHigh at rest, surfaceContainer when scrolled).

Parameters

title

The title to be displayed in the top app bar, typically a Text with the screen name.

modifier

Modifier applied to the CenterAlignedTopAppBar root.

navigationIcon

Optional composable at the start of the bar, typically an IconButton for back or drawer navigation. When null, no leading content is shown.

actions

Optional composables at the end of the bar, laid out horizontally in a RowScope, typically IconButtons.

windowInsets

WindowInsets that the app bar respects. Defaults to TopAppBarDefaults.windowInsets.

colors

TopAppBarColors for the bar. Defaults to Stylish containers: MaterialTheme.colorScheme.surfaceContainerHigh at rest and MaterialTheme.colorScheme.surfaceContainer when scrolled.

scrollBehavior

A TopAppBarScrollBehavior that changes the bar's height and colors as content scrolls. Typically created via TopAppBarDefaults.enterAlwaysScrollBehavior() or TopAppBarDefaults.pinnedScrollBehavior() and shared with the scrolling content via Modifier.nestedScroll.

titleContentColor

Override for the title content color. When null (default), colors decides the title color.

navigationIconContentColor

Override for the navigation icon color. When null (default), colors decides.

actionIconContentColor

Override for the action icons color. When null (default), colors decides.

See also