androidx.compose.material3

FloatingActionButtonMenuItemSince 1.10

Composable function

A part of FloatingActionButtonMenu. See that page for an overview and examples.

Parameters

@Composable
fun FloatingActionButtonMenuScope.FloatingActionButtonMenuItem(
    onClick: () -> Unit,
    text: @Composable () -> Unit,
    icon: @Composable () -> Unit,
    modifier: Modifier = Modifier,
    containerColor: Color = MaterialTheme.colorScheme.primaryContainer,
    contentColor: Color = contentColorFor(containerColor),
)

onClick: () -> UnitRequired

Called when the item is clicked. Close the menu here too.

text: @Composable () -> UnitRequired

The label of the item.

icon: @Composable () -> UnitRequired

The icon of the item.

containerColor: ColorOptional

Default: MaterialTheme.colorScheme.primaryContainer

The background color. For the toggle button, a function of the progress, from closed to open color.

contentColor: ColorOptional

Default: contentColorFor(containerColor)

The text and icon color of an item.

Same as in FloatingActionButtonMenu: modifier.

Parts