Skip to content
🤔 Documentation issue? Report or edit

Switch

@Composable
fun SwitchDemo() {
    val checkedState = remember { mutableStateOf(true) }
    Switch(
        checked = checkedState.value,
        onCheckedChange = { checkedState.value = it }
    )
}

See also:


Last update: October 13, 2021
Back to top