StylishTriStateCheckbox

fun StylishTriStateCheckbox(state: ToggleableState, onClick: () -> Unit?, modifier: Modifier = Modifier, enabled: Boolean = true, colors: CheckboxColors = CheckboxDefaults.colors(), interactionSource: MutableInteractionSource? = null)

A tri-state checkbox for expressing partial selection, wrapping the Material 3 TriStateCheckbox so it can be themed consistently with the rest of Stylish UI.

Use this for the parent of a group of StylishCheckboxes: checked when every child is checked, ToggleableState.Indeterminate when some (but not all) children are checked, and unchecked when none are. The child group drives the state; this checkbox only reflects it (the caller typically passes a toggle that cycles the state).

Parameters

state

Whether the checkbox is checked, unchecked, or in the ToggleableState.Indeterminate state.

onClick

Called when the user taps the checkbox. null makes the checkbox display-only.

modifier

Modifier applied to the TriStateCheckbox root.

enabled

When false, the checkbox ignores pointer input and renders in the disabled color scheme.

colors

Colors used in each state. Defaults to CheckboxDefaults.colors.

interactionSource

The MutableInteractionSource for the checkbox, used to observe press/focus/hover interactions. When null, an internal one is remembered.

See also