App bar row

A row of actions that moves what does not fit into an overflow menu.

When to use

App bar row is the layout behind app bar actions. Declare each action once with a label and an icon. When space runs out the remaining actions become menu items with the same label.

Use AppBarColumn for the same behavior in a vertical bar.

Playground

The interactive page has a playground with live property controls for this component and generated code.

Examples

Custom overflow indicator

AppBarRow(
    modifier = Modifier.width(240.dp),
    overflowIndicator = { menuState ->
        IconButton(onClick = { if (menuState.isShowing) menuState.dismiss() else menuState.show() }) {
            Icon(Icons.Rounded.MoreHoriz, contentDescription = "More actions")
        }
    },
) {
    clickableItem(onClick = {}, icon = { Icon(Icons.Rounded.Edit, contentDescription = null) }, label = "Edit")
    clickableItem(onClick = {}, icon = { Icon(Icons.Rounded.Share, contentDescription = null) }, label = "Share")
    clickableItem(onClick = {}, icon = { Icon(Icons.Rounded.Delete, contentDescription = null) }, label = "Delete")
}

Parameters

NameTypeDefaultDescription
overflowIndicator@Composable (AppBarMenuState) -> UnitAppBarOverflowIndicatorShown when items overflow.
maxItemCountIntInt.MAX_VALUEUpper limit of visible actions.
contentAppBarRowScope.() -> UnitclickableItem, toggleableItem and customItem.

Guidelines

Do:

Don't:

Accessibility

Related components