Compose Component

FloatingActionButtonMenu

FAB Menus should be used in conjunction with a ToggleFloatingActionButton to provide additional choices to the user after clicking a FAB.

FloatingActionButtonMenu social preview

FloatingActionButtonMenu

Source set: Common
@Composable
public 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
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: