ButtonGroup
A button group: it lines up several Button elements so adjacent ones connect head-to-tail into a single block.
Basic usage
Mixing in toggle buttons
A group can hold both plain buttons and ToggleButton elements, common in editor toolbars.
Group-level disable
Setting disabled on the group propagates it to every button inside, so you don't have to set each one.
Difference from the original
The original has no group-level disabled propagation — each child button would have to be disabled one by one; this library passes the group's disabled down through a React context. A button's effective disabled is the OR of its own state and its group's.
API
See also
- Buttons within the group: Button, ToggleButton
- Common pass-through and
refrules: Common props