JengaTopAppBar

fun JengaTopAppBar(title: String, modifier: Modifier = Modifier, subtitle: String? = null, navigationIcon: @Composable () -> Unit? = null, actions: @Composable RowScope.() -> Unit = {}, showDivider: Boolean = true, height: Dp = JengaTheme.components.topAppBar?.height ?: JengaTopAppBarDefaults.Height, contentPadding: PaddingValues = JengaTopAppBarDefaults.contentPadding, colors: JengaTopAppBarColors = JengaTopAppBarDefaults.colors(), titleStyle: TextStyle = JengaTopAppBarDefaults.titleStyle)(source)

A top app bar with a title, optional navigation icon and trailing actions.

Applies status-bar inset padding itself, so it sits correctly under the system bar whether or not it is hosted in a JengaScaffold.

Parameters

title

the bar title.

modifier

the Modifier for this bar.

subtitle

optional secondary line under the title (e.g. context/details).

navigationIcon

optional leading icon (e.g. back); inherits content color.

actions

trailing actions laid out in a RowScope; inherit content color.

showDivider

whether the bottom divider is drawn (e.g. only once content scrolls under it).

height

the minimum bar height, excluding the status-bar inset; defaults to the theme's JengaTopAppBarStyle.height, else JengaTopAppBarDefaults.Height.

contentPadding

padding inside the bar.

colors

the color set; defaults to JengaTopAppBarDefaults.colors.

titleStyle

the title text style.

Samples

JengaTopAppBar(
    title = "Events",
)

fun JengaTopAppBar(title: @Composable () -> Unit, modifier: Modifier = Modifier, navigationIcon: @Composable () -> Unit? = null, actions: @Composable RowScope.() -> Unit = {}, showDivider: Boolean = true, height: Dp = JengaTheme.components.topAppBar?.height ?: JengaTopAppBarDefaults.Height, contentPadding: PaddingValues = JengaTopAppBarDefaults.contentPadding, colors: JengaTopAppBarColors = JengaTopAppBarDefaults.colors())(source)

A top app bar whose title is a slot, for titles that are more than one string (e.g. a monospaced id with a subtitle, or a tappable switcher line).

Parameters

title

the title content; inherits content color.

modifier

the Modifier for this bar.

navigationIcon

optional leading icon (e.g. back); inherits content color.

actions

trailing actions laid out in a RowScope; inherit content color.

showDivider

whether the bottom divider is drawn (e.g. only once content scrolls under it).

height

the minimum bar height, excluding the status-bar inset; defaults to the theme's JengaTopAppBarStyle.height, else JengaTopAppBarDefaults.Height.

contentPadding

padding inside the bar.

colors

the color set; defaults to JengaTopAppBarDefaults.colors.