Capítulo 45 de 51
A one-part wrapper coordinating multiple Toggle children — multiple switches between "always exactly one pressed" (like a segmented control) and "any subset pressed" (like independent formatting buttons grouped visually).
<ToggleGroup> wraps plain Toggle children directly — no other sub-parts.multiple: false (default behavior implied) → mutually exclusive, single active toggle, like Radio's exclusivity but with toggle-button styling; true → independent multi-select, like a CheckboxGroup rendered as buttons.value/defaultValue/onValueChange on the group, array-based when multiple.loopFocus + orientation, same arrow-key navigation convention as Menu/Radio Group/Tabs.| Part | Notable props | Notable data attributes |
|---|---|---|
ToggleGroup | value/defaultValue/onValueChange, multiple, loopFocus, orientation, disabled | data-orientation, data-multiple, data-disabled |
multiple explicitly to match the intended semantics — a text-alignment picker (left/center/right, exactly one active) needs multiple={false}; a text-formatting toolbar (bold/italic/underline, any combination) needs multiple={true}.Toggles still need a unique value within the group — that's what the group's value/onValueChange array tracks.