Components

DhSwitch

Binary on/off toggle. Used bare or as a labelled row that fills the available width with the switch aligned right.

Bare switch

Only the switch — when the label lives elsewhere (table cell, custom layout).

Light dh-switch bare, on (light theme)
Dark dh-switch bare, on (dark theme)
var on by remember { mutableStateOf(false) }

DhSwitch(checked = on, onCheckedChange = { on = it })

Labelled row

Default settings-row pattern: label fills the available width, switch right-aligned.

Light dh-switch labelled, on (light theme)
Dark dh-switch labelled, on (dark theme)
DhSwitch(
    checked = cellular,
    onCheckedChange = { cellular = it },
    label = "Cellular data"
)

Disabled

enabled = false fades both label and switch.

Light dh-switch labelled, disabled (light theme)
Dark dh-switch labelled, disabled (dark theme)
DhSwitch(
    checked = false,
    onCheckedChange = {},
    label = "Experimental features",
    enabled = false
)