Input

SKCheckbox

SKCheckbox supports checked, unchecked and indeterminate states, with an optional inline label that expands the touch target across the whole row.

Betasince 1.5.0Compose · XMLAll components

Not yet released. SKCheckbox is planned for 1.5.0; the current published release (1.4.0-alpha01) ships SKText and SKTextField only.

Usage

SKCheckbox.kt
SKCheckbox(
    state = SKToggleState.Indeterminate,
    label = "Select all invoices",
    onStateChange = { state = it }
)

Props

PropTypeDefaultDescription
stateSKToggleStateUncheckedChecked, Unchecked or Indeterminate.
labelString?nullInline row label.
onStateChange(SKToggleState) -> Unit—State callback.

Accessibility

Row-level toggle semantics, indeterminate state announced correctly, keyboard activatable.

Theming

Uses SKTheme.colors.primary for the checked container.

API surface

  • SKCheckbox
  • SKToggleState

Related