Switch

fun Switch(checked: Boolean, onCheckedChange: (Boolean) -> Unit?, modifier: Modifier = Modifier, colors: SwitchColors = SwitchDefaults.switchColors(), enabled: Boolean = true)

A Switch component with Miuix style.

Parameters

checked

The checked state of the Switch.

onCheckedChange

The callback to be called when the state of the Switch changes.

modifier

The modifier to be applied to the Switch.

colors

The SwitchColors of the Switch.

enabled

Whether the Switch is enabled.