Compose Component

ButtonGroup

A ButtonGroup is a horizontal container for multiple Buttons, allowing them to scroll if they exceed the size of the viewport.

ButtonGroup

Source set: Android
@Composable
public fun ButtonGroup(
    modifier: Modifier = Modifier,
    state: ButtonGroupState = rememberButtonGroupState(),
    horizontalArrangement: Arrangement.Horizontal = ButtonGroupDefaults.HorizontalArrangement,
    verticalAlignment: Alignment.Vertical = ButtonGroupDefaults.VerticalAlignment,
    contentPadding: PaddingValues = ButtonGroupDefaults.ContentPadding,
    content: @Composable () -> Unit,
)

Parameters

modifier The modifier to be applied to the ButtonGroup
state The ButtonGroupState of this ButtonGroup
horizontalArrangement The horizontal arrangement of the ButtonGroup's children
verticalAlignment The vertical alignment of the ButtonGroup's children
contentPadding The spacing values to apply internally between the container and content
content The content of the ButtonGroup
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: