Jenga Checkbox List Item
A list row with a JengaCheckbox, for picking several options from a list. The whole row is the touch target and is announced as a checkbox.
Parameters
the option label.
whether this option is checked.
called with the new checked state when the row is tapped.
the Modifier for this row.
optional secondary text below the headline.
whether the row is interactive.
whether the checkbox sits at the start or the end of the row.
the minimum row height.
inner padding around the row content.
the gap between the control and the text.
the headline text style.
the supporting text style.
the maximum lines for headline before it is truncated.
the maximum lines for supporting before it is truncated.
optional end slot (e.g. a count), before a trailing control; tapping it toggles the row.
the checkbox box shape.
the row color set; its disabled colors apply when enabled is false, so a locked row can keep its label in the normal text color while only the box fades.
the checkbox color set (e.g. a faded checked fill when disabled).
whether a spinner replaces the checkbox (e.g. while the change saves); taps are ignored.
Samples
var checked by remember {
mutableStateOf(
value = true,
)
}
JengaCheckboxListItem(
headline = "Battery",
checked = checked,
onCheckedChange = { checked = it },
)