🌈 Create new beautiful Compose Gradients with our new wesite ->
Compose Component

SplitSwitchButton

The Wear Material SplitSwitchButton offers slots and a specific layout for a label and secondary label.

SplitSwitchButton social preview

SplitSwitchButtonSample

@Sampled
@Preview
@Composable
fun SplitSwitchButtonSample() {
    var checked by remember { mutableStateOf(true) }
    SplitSwitchButton(
        label = { Text("Split Switch Button", maxLines = 3, overflow = TextOverflow.Ellipsis) },
        checked = checked,
        onCheckedChange = { checked = it },
        toggleContentDescription = "Split Switch Button Sample",
        onContainerClick = {
            /* Do something */
        },
        enabled = true,
    )
}