Jenga Toggle
fun JengaToggle(checked: Boolean, onCheckedChange: (Boolean) -> Unit?, modifier: Modifier = Modifier, enabled: Boolean = true, colors: JengaToggleColors = JengaToggleDefaults.colors())(source)
An on/off switch.
Parameters
checked
whether the toggle is on.
on Checked Change
called with the new state; pass null for a read-only, externally-driven toggle.
modifier
the Modifier for this toggle.
enabled
whether the toggle is interactive.
colors
the color set; defaults to JengaToggleDefaults.colors.
Samples
var on by remember {
mutableStateOf(
value = true,
)
}
JengaToggle(
checked = on,
onCheckedChange = { on = it },
)Content copied to clipboard