Compose Component

SplitCheckboxButton

The Wear Material SplitCheckboxButton offers slots and a specific layout for a label and secondaryLabel.

SplitCheckboxButton social preview

SplitCheckboxButtonSample

@Sampled
@Preview
@Composable
fun SplitCheckboxButtonSample() {
    var checked by remember { mutableStateOf(true) }
    SplitCheckboxButton(
        label = { Text("Split Checkbox Button", maxLines = 3, overflow = TextOverflow.Ellipsis) },
        checked = checked,
        onCheckedChange = { checked = it },
        toggleContentDescription = "Split Checkbox Button Sample",
        onContainerClick = { /* Do something */ },
        containerClickLabel = "click",
        enabled = true,
    )
}
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: