Horizontal composition wrapper that visually joins independent Button and IconButton actions.
Install @wyrd-company/react or the Flutter package and use it directly —
your DESIGN.md does the styling.
catalog/contracts/button-group.ymlsource of truth · verbatim
$schema: https://thewyrdingway.dev/schemas/component-contract.schema.ymlcontractVersion: 0.1.0identity:name: ButtonGrouptag: wyrd-button-grouppackage: wyrd.component.button-grouptitle: Button Groupsummary: Horizontal composition wrapper that visually joins independent Button and IconButton actions.relationships:related-to: - quality-parity-and-gatesclassification:category: actioncomposition: single-slotinteractive: falsetarget-strategy:react: requiredflutter: requiredsurface:properties: - name: labeltype:kind: stringrequired: trueserializable: truesummary: Required accessible name for the group of actions.slots: - name: actionscontent: truerequired: truecardinality: one-or-manyaccepts: - componentsummary: Independent Button or IconButton actions in visual and focus order.events: []states: - name: defaultsource: platformsummary: Horizontal group of enabled or independently stateful actions.parts: - name: rootsummary: Named horizontal action group.slots: - actionstokens:radius: rounded.mddivider-color: color.outlinedivider-width: 1pxmessages: []obligations:accessibility:role: groupname: Label property provides the required accessible name.keyboard: - Each child retains native keyboard behavior and document-order focus. - No roving tabindex is introduced because children are independent actions rather than a selection control.semantics: - Child Button and IconButton roles, names, disabled states, and loading states remain unchanged. - Grouping does not imply selection or mutually exclusive state.behavior:model: statelessinteractions: - Child actions own activation and event behavior. - Adjacent children share visual edges while retaining independent hit targets.hostEffects: []conditions: - rtl - reduced-motion - cvd-deuteranopia - density-compact - text-expansionsdui:status: serializableserializableProperties: - labelserializableSlots: - actionseventBindings: []notes: V1 is horizontal. Vertical orientation is a future extension; Toggle Group owns selection-control behavior.examples: - name: document-actionsstate: defaultproperties:label: Document workflow actionsslots:actions: Save draft | Preview | Publish - name: formatting-actionsstate: defaultproperties:label: Formatting actionsslots:actions: Bold | Italic | Linkoverrides:react:slots:actions: childrenflutter:slots:actions: children
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.
Required accessible name for the group of actions.
03
Slots & events
Slot
Cardinality
Accepts
Summary
actions
one-or-many
component
Independent Button or IconButton actions in visual and focus order.
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
radius
rounded.md
divider-color
color.outline
divider-width
1px
05
States
State
Source
Summary
default
platform
Horizontal group of enabled or independently stateful actions.
06
Accessibility
From the contract's accessibility obligations. Role group; Label property provides the required accessible name.
Each child retains native keyboard behavior and document-order focus.
No roving tabindex is introduced because children are independent actions rather than a selection control.
Child Button and IconButton roles, names, disabled states, and loading states remain unchanged.
Grouping does not imply selection or mutually exclusive state.