Boolean choice control with required, disabled, checked, indeterminate, and one canonical checked-change event.
Install @wyrd-company/react or the Flutter package and use it directly —
your DESIGN.md does the styling.
catalog/contracts/checkbox.ymlsource of truth · verbatim
$schema: https://thewyrdingway.dev/schemas/component-contract.schema.ymlcontractVersion: 0.1.0identity:name: Checkboxtag: wyrd-checkboxpackage: wyrd.component.checkboxtitle: Checkboxsummary: Boolean choice control with required, disabled, checked, indeterminate, and one canonical checked-change event.relationships:related-to: - quality-parity-and-gates - form-fieldclassification:category: form-fieldcomposition: single-slotinteractive: truetarget-strategy:react: requiredflutter: requiredsurface:properties: - name: is-checkedtype:kind: booleanrequired: falsedefault: falsecontrolled: truereflects: trueserializable: truesummary: Checked state of the boolean choice. - name: is-indeterminatetype:kind: booleanrequired: falsedefault: falsereflects: trueserializable: truesummary: Mixed state used when a parent choice represents both checked and unchecked descendants. - name: is-disabledtype:kind: booleanrequired: falsedefault: falsereflects: trueserializable: truesummary: Prevents editing and exposes disabled platform semantics. - name: is-requiredtype:kind: booleanrequired: falsedefault: falsereflects: trueserializable: truesummary: Marks the choice as required when it participates in a form.slots: - name: labelcontent: truerequired: truecardinality: exactly-oneaccepts: - text - nodesummary: Visible label and accessible-name source.events: - name: checked-changepayload:checked:kind: booleanindeterminate:kind: booleanaction:kind: action-refbubbles: truecomposed: truecancelable: falsesummary: Canonical checked-state change event carrying the next checked and indeterminate states.states: - name: uncheckedsource: propertysummary: Enabled state when is-checked is false. - name: checkedsource: propertysummary: Enabled state when is-checked is true. - name: indeterminatesource: propertysummary: Mixed state derived from is-indeterminate. - name: focus-visiblesource: platformsummary: Keyboard-visible focus state. - name: disabledsource: propertysummary: Disabled state derived from is-disabled. - name: requiredsource: propertysummary: Required state derived from is-required.parts: - name: rootsummary: Label/control row.slots: - label - name: controlsummary: Native checkbox control. - name: labelsummary: Label content container.slots: - labeltokens:root:gap: spacing.smcontrol:size: spacing.mdbackground: color.surfacebackground-checked: color.primaryforeground-checked: color.on-primaryborder-color: color.outlineborder-color-focus: color.primaryborder-color-disabled: color.disabledborder-width: 1pxradius: rounded.smlabel:color: color.on-surfacetext: typography.body-mdmessages: []obligations:accessibility:role: checkboxname: Label slot provides the accessible name.keyboard: - Space toggles the checkbox when enabled. - Tab moves focus into and out of the checkbox in document order.semantics: - Checked, indeterminate, required, and disabled states are exposed through platform semantics. - Indeterminate is exposed as mixed on platforms with mixed checkbox semantics.behavior:model: inputinteractions: - Activation toggles checked state when the checkbox is enabled. - Activation from indeterminate clears indeterminate and emits checked-change.hostEffects: - Dispatch checked-change event. - Bind checked state to SDUI form state when present.conditions: - rtl - reduced-motion - cvd-deuteranopia - density-compact - text-expansionsdui:status: serializableserializableProperties: - is-checked - is-indeterminate - is-disabled - is-requiredserializableSlots: - labeleventBindings: - checked-changenotes: Checked-change serializes to a named binding/action channel.examples: - name: uncheckedstate: uncheckedproperties:is-checked: falseslots:label: Accept terms - name: checkedstate: checkedproperties:is-checked: trueslots:label: Email me updates - name: indeterminatestate: indeterminateproperties:is-indeterminate: trueslots:label: Select all permissions
01
Examples
Generated from the contract's examples block.
Previews are the published @wyrd-company/react component, themed by the
brand's role tokens — flip the site's light/dark toggle and they follow.
Mixed state used when a parent choice represents both checked and unchecked descendants.
is-disabled
boolean
false
Prevents editing and exposes disabled platform semantics.
is-required
boolean
false
Marks the choice as required when it participates in a form.
03
Slots & events
Slot
Cardinality
Accepts
Summary
label
exactly-one
text, node
Visible label and accessible-name source.
Event
Payload
Summary
checked-change
checked, indeterminate, action
Canonical checked-state change event carrying the next checked and indeterminate states.
04
Tokens
The contract's token bindings. Open the shared contextual sidebar from any example;
primary swatches reflect the color you pick there. Error swatches show the active
preset's values; editing any knob switches to custom and resets error to TWW · Ink.
Binding
Token
root.gap
spacing.sm
control.size
spacing.md
control.background
color.surface
control.background-checked
color.primary
control.foreground-checked
color.on-primary
control.border-color
color.outline
control.border-color-focus
color.primary
control.border-color-disabled
color.disabled
control.border-width
1px
control.radius
rounded.sm
label.color
color.on-surface
label.text
typography.body-md
05
States
State
Source
Summary
unchecked
property
Enabled state when is-checked is false.
checked
property
Enabled state when is-checked is true.
indeterminate
property
Mixed state derived from is-indeterminate.
focus-visible
platform
Keyboard-visible focus state.
disabled
property
Disabled state derived from is-disabled.
required
property
Required state derived from is-required.
06
Accessibility
From the contract's accessibility obligations. Role checkbox; Label slot provides the accessible name.
Space toggles the checkbox when enabled.
Tab moves focus into and out of the checkbox in document order.
Checked, indeterminate, required, and disabled states are exposed through platform semantics.
Indeterminate is exposed as mixed on platforms with mixed checkbox semantics.