API reference

Checkbox Composable

Displays a binary selection control for independently selectable options.

Signature

@Composable
fun Checkbox(
    checked: Boolean,
    onCheckedChange: (Boolean) -> Unit?,
    modifier: Modifier = Modifier,
    contentDescription: String? = null,
    enabled: Boolean = true,
    colors: CheckboxColors = CheckboxDefaults.Colors,
    dimensions: ControlDimensions = UiSetTheme.dimensions.controls,
    shape: Shape = UiSetTheme.shapes.control,
    indication: UiSetIndicationSpec? = UiSetTheme.indications.standard.default,
)

Parameters

checked: Boolean whether the option is selected
onCheckedChange: ((Boolean) -> Unit)? callback receiving the requested state, or null when a parent owns the interaction semantics
modifier: Modifier modifier applied to the 48dp interaction target
contentDescription: String? accessibility label when no external label describes the control
enabled: Boolean whether the control accepts input
colors: CheckboxColors colors for checked, unchecked, and disabled states
dimensions: ControlDimensions visual size, border width, and mark stroke values
shape: Shape visual checkbox shape
indication: UiSetIndicationSpec? interaction feedback split around the checkbox clipping boundary