Tri-state checked value. 'mixed' renders the indeterminate dash.
onChange
(next: boolean) => void
n/a
Fired with the next boolean value. Ignored while disabled.
label
string
n/a
Persistent visible label (rendered beside the box, the box is its target).
description
string
n/a
Supporting line under the label.
size
NockerlCheckboxSize
'md'
Box scale. md matches the platform default.
disabled
boolean
false
Inert + clearly-seen (never invisible) state.
invalid
boolean
false
Invalid: warm error border + a "!" mark + a message. Color is never alone.
ariaLabel
string
n/a
aria-label when there is no visible label (standalone / inline use).
Also accepts the native <input> attributes (e.g. onClick, disabled, id, aria-*, data-*), forwarded straight through, plus a forwarded ref.
Parameter
Type
Default
Description
checked *
Boolean
n/a
Whether the box is ticked. (Two-state Checkbox.)
onCheckedChange *
((Boolean) -> Unit)?
n/a
Invoked with the new value. Pass null when the parent Row is toggleable and owns the click.
state *
ToggleableState
n/a
TriStateCheckbox only: On / Off / Indeterminate, the parent box for a child group.
onClick *
(() -> Unit)?
n/a
TriStateCheckbox only: invoked on click. Pass null for a read-only parent.
modifier
Modifier
Modifier
External modifier. The clickable target is usually the surrounding toggleable row.
enabled
Boolean
true
When false, the box dims (alpha) and stops responding.
colors
CheckboxColors
CheckboxDefaults.colors()
Brand override: checkedColor = accentPrimary so the filled square box is the cyan anchor (the box is a square, distinct from the radio circle).
SwiftUI renders the checkbox via the standard Toggle with .toggleStyle(.checkbox):
a square box with a checkmark, tinted by the app accent (never the radio circle).
State is the isOn binding; isEnabled comes from the environment. There is no
built-in indeterminate or invalid parameter. Model mixed as an explicit flag and
gate disabled at the binding / view level.
Style
Type
Default
Description
isOn *
Binding<Bool>
n/a
Two-way binding for the checked state.
titleKey
LocalizedStringKey
n/a
The label. Use "" + .labelsHidden() when the row already shows it.
.toggleStyle(.checkbox)
ToggleStyle
n/a
The native macOS checkbox (box + tick). The on tick is tinted by the app accent.
.tint(_:)
modifier
n/a
Sets the checked tint to NockerlTheme.accent (the cyan anchor).
.disabled(_:)
modifier
n/a
Sets the environment isEnabled; the checkbox dims and stops responding.
Cross-platform drift (tracked for reconciliation)
The checkbox is the multi-selection control, a square box with a check fill,
deliberately distinct from its selection-control siblings: a
radio is a circle with a centered dot for
mutually-exclusive single choice, and a switch is a
track + thumb for an instant on/off setting. The square (barely-softened
radius.track corners) is the shape that says multi-select, never the radio circle.
Web ships it.Checkbox is exported from @dizyx/nockerl-react (the
TypeScript API above), tri-state included: CheckedState covers 'mixed'.
Tri-state / indeterminate is shipped only on web so far. Android has the
two-state Checkbox (multi-select via a MutableSet in AskUserQuestionSheet.kt)
and TriStateCheckbox is available but unused; Voice has no checkbox at all. The
parent/child mixed behaviour here is designed originally. Wire it into a real
Compose TriStateCheckbox and a Swift mixed-flag when those screens need it.
Box treatment: the web island draws a square recessed well (1:1, subtly
softened radius.track corners) that lifts to a static cyan gradient with a
stroke-drawn tick (sibling to the Switch track, distinct from the radio circle).
Compose + SwiftUI use the stock platform box (also square) themed only on the
checked color. The inset-well + catch-light treatment should flow into a custom
Compose box when web’s API ships.
Invalid state: only web models an invalid checkbox (warm border + ! +
message). Compose and SwiftUI surface validation at the form level today.