Compose Component

SplitToggleChip

A SplitToggleChip is a specialized type of Chip that includes a slot for a toggle control, such as a toggle or checkbox.

SplitToggleChipWithCheckbox

@Sampled
@Composable
fun SplitToggleChipWithCheckbox() {
    var checked by remember { mutableStateOf(true) }
    // The primary label should have a maximum 3 lines of text
    // and the secondary label should have max 2 lines of text.
    SplitToggleChip(
        label = { Text("Split with CheckboxIcon", maxLines = 3, overflow = TextOverflow.Ellipsis) },
        checked = checked,
        toggleControl = { Checkbox(checked = checked, enabled = true) },
        onCheckedChange = { checked = it },
        onClick = { /* Do something */ },
        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: