FAB Menus should be used in conjunction with a ToggleFloatingActionButton to provide additional choices to the user after clicking a FAB.
FloatingActionButtonMenu
Common
@ExperimentalMaterial3ExpressiveApi
@Composable
fun FloatingActionButtonMenu(
expanded: Boolean,
button: @Composable () -> Unit,
modifier: Modifier = Modifier,
horizontalAlignment: Alignment.Horizontal = Alignment.End,
content: @Composable FloatingActionButtonMenuScope.() -> Unit,
)
Parameters
| expanded | whether the FAB Menu is expanded, which will trigger a staggered animation of the FAB Menu Items |
| button | a composable which triggers the showing and hiding of the FAB Menu Items via the expanded state, typically a ToggleFloatingActionButton |
| modifier | the Modifier to be applied to this FAB Menu |
| horizontalAlignment | the horizontal alignment of the FAB Menu Items |
| content | the content of this FAB Menu, typically a list of FloatingActionButtonMenuItems |