Skip to content

Checkbox

@Composable



fun Checkbox(
    checked: Boolean = false, 
    modifier: Modifier = Modifier, 
    enabled: Boolean = true, 
    texture: String = "checkbox", 
    variant: String = ThemeVariants.DEFAULT, 
    onCheckedChange: (Boolean) -> Unit
)

A standard themed checkbox.

Renders the themed texture state - a combined checked+hovered state is used when both apply and the theme defines it. Built on top of CheckboxCore; use that directly for fully custom visuals.

Parameters

  • checked: The current checked state.

  • modifier: Additional modifiers applied to the outer container.

  • enabled: When false, the disabled state is drawn, pointer/activation-key events are ignored, and this drops out of the vanilla focus graph entirely.

  • texture: The themed texture key to look up via LocalTheme.

  • variant: The theme variant of texture to use. See ThemeVariants.

  • onCheckedChange: Called with the new checked value when the user clicks.