Composable Component

FloatingActionButtonMenuItem

FAB Menu Items should be used within a FloatingActionButtonMenu to provide additional choices to the user after clicking a FAB.

FAB Menu Items should be used within a FloatingActionButtonMenu to provide additional choices to the user after clicking a FAB.

FloatingActionButtonMenuItem

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

Parameters

onClick called when this FAB Menu Item is clicked
text label displayed inside this FAB Menu Item
icon optional icon for this FAB Menu Item, typically an Icon
modifier the Modifier to be applied to this FAB Menu Item
containerColor the color used for the background of this FAB Menu Item
contentColor the preferred color for content inside this FAB Menu Item. Defaults to either the matching content color for containerColor, or to the current LocalContentColor if containerColor is not a color from the theme.