Start native apps faster with the Composables CLI ->
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

Last updated: