form-field — wyrd.component.checkbox-group

CheckboxGroup

Multi-choice form control group with option items, field text, and one canonical values-change event.

Install @wyrd-company/react or the Flutter package and use it directly — your DESIGN.md does the styling.

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.

Code target Applies to every example on component pages.
empty state: default
Notification channels

Choose every channel collaborators may use.

Usage
import { WyrdCheckboxGroup } from "@wyrd-company/react";

<WyrdCheckboxGroup options={[{"value":"email","label":"Email"},{"value":"sms","label":"SMS"},{"value":"phone","label":"Phone"}]} label="Notification channels" description="Choose every channel collaborators may use." />

// events: onValuesChange
selected state: checked
Notification channels
Usage
import { WyrdCheckboxGroup } from "@wyrd-company/react";

<WyrdCheckboxGroup defaultValues={["email","sms"]} options={[{"value":"email","label":"Email"},{"value":"sms","label":"SMS"},{"value":"phone","label":"Phone"}]} label="Notification channels" />

// events: onValuesChange
invalid state: invalid
Notification channels
Usage
import { WyrdCheckboxGroup } from "@wyrd-company/react";

<WyrdCheckboxGroup isInvalid isRequired options={[{"value":"email","label":"Email"},{"value":"sms","label":"SMS"},{"value":"phone","label":"Phone"}]} label="Notification channels" error="Select at least one channel." />

// events: onValuesChange
02

Properties

NameTypeDefaultSummary
values array Controlled selected option values.
default-values array Initial uncontrolled selected option values.
options array Ordered selectable checkbox option items.
is-disabled boolean false Prevents changing selection and exposes disabled group semantics.
is-required boolean false Marks the group as requiring at least one selected option.
is-invalid boolean false Marks the selection as invalid and associates the error slot.
03

Slots & events

SlotCardinalityAcceptsSummary
label exactly-one text Visible group label and accessible-name source.
description zero-or-one text Help text associated with the checkbox group.
error zero-or-one text Validation error associated when is-invalid is true.
EventPayloadSummary
values-change values, action Canonical values-change event carrying the full selected values array.
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.

BindingToken
root.gap spacing.xs
label.color color.on-surface
label.text typography.label-md
required-indicator.color color.error
group.gap spacing.sm
option.gap spacing.sm
option.padding-y spacing.xs
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
control.disabled-opacity opacity.disabled
option-label.color color.on-surface
option-label.text typography.body-md
option-description.color color.on-surface-variant
option-description.text typography.body-md
description.color color.on-surface-variant
description.text typography.body-md
error.color color.error
error.text typography.body-md
05

States

StateSourceSummary
default platform Enabled group with no invalid or disabled state.
checked property State when one or more options matching values or default-values are selected.
focus-visible platform Keyboard-visible focus state on a checkbox option.
disabled property Disabled state derived from is-disabled or option disabled.
invalid property Invalid state derived from is-invalid.
required property Required state derived from is-required.
06

Accessibility

From the contract's accessibility obligations. Role group; Label slot provides the accessible name.

  • Tab moves focus into and out of checkbox options in document order.
  • Space toggles the focused enabled checkbox option.
  • The group exposes required, invalid, and disabled state where the platform supports it.
  • Each option exposes checked and disabled state through native checkbox semantics.
  • Error text is associated only when invalid.
  • Verified under: rtl, reduced-motion, cvd-deuteranopia, density-compact, text-expansion.
07

SDUI

Status: serializable. Options serialize as ordered records; values-change serializes to a named binding/action channel.

SerializableMembers
Propertiesvalues, default-values, options, is-disabled, is-required, is-invalid
Slotslabel, description, error
Eventsvalues-change
The Wyrding Way — a contract-first design system. © Wyrd Company