Skip to content

SwitchCore

@Composable



fun SwitchCore(
    checked: Boolean, 
    onCheckedChange: (Boolean) -> Unit, 
    enabled: Boolean = true, 
    content: @Composable



 (modifier: Modifier, isHovered: Boolean, isFocused: Boolean, checked: Boolean) -> Unit
)

Low-level switch primitive exposing hover/focus state and checked state to custom visuals. Built on Modifier.toggleable, so it's a vanilla keyboard/controller focus-navigation stop that toggles on Enter/Space while focused, the same as a mouse click.