# ToggleGroup · semantische Komponentenreferenz

Choose one or several pressed formatting tools, and describe standalone Toggle from the same native source family.

Status der neuen Domänenmigration: **complete** im begrenzten Referenzumfang. Stabile Teile, tatsächlich passende Source-Selektoren, semantische Tokenwerte und nutzbare Zustands-Fixtures wurden mit dem normalen Komponentenprüfpfad und der echten React-Verwendung geprüft. [Browsernachweis](../../validation/semantic-selection-browser-run.json); keine allgemeine Anwendungsfreigabe.

Both grouped and standalone Toggle consume actual cn-toggle CVA classes; standalone does not emit invented data-size/data-variant attributes. Native heights 28/32/36px map sm/default/lg, with 8px small and 10px default/large corners,10px inline inset and 4px text/icon gap. Width is intrinsic, never copied 59/66px specimen text widths. The actual Root --gap stores numeric spacing units; this reference binds the 4px unit so default spacing 2 becomes native 8px. spacing 0 outline groups join logical borders/corners, including RTL. This fixes the reference styling against actual data-orientation/data-spacing attributes instead of depending on stale data-horizontal utilities; it does not fix or claim vertical primitive keyboard support. Raw Root consumes orientation without forwarding it, so reference groups remain horizontal. Group size/variant context wins over item appearance when set; array-valued group selection and boolean standalone pressed state remain distinct. RTL keyboard behavior requires Base UI DirectionProvider in addition to HTML dir. Focus and single/multiple selection follow actual composite/native button behavior; no toolbar role or invented onToggle event is added.

[Stabile Anatomie und tatsächliche Source-/Caller-Bindungen](component.json), [CEM](interface.json), [semantische Zustands-/Variantenregeln](layout.css), [brauchbare Fixtures](stories.json). Native Muster, Hashes und Messwerte bleiben vollständig separat in [Quellmustern](figma/source-specimens.json) und [Traceability](figma/traceability.json).

Die veröffentlichten Props/Callbacks und der [führende SCXML-Aktor](behavior.scxml) bleiben die Quelle des tatsächlichen Verhaltens. [HTML/ARIA](accessibility.html) und [Projektionsregeln](accessibility.rules.json) benennen die konkrete Verwendung, einschließlich notwendiger Caller-Beschriftung. Selectorbindungen sind ein expliziter React-/DOM-Adaptervertrag, keine erfundenen automatischen Shadow-DOM-Exports.

ToggleGroup value/defaultValue are arrays even when multiple=false. multiple=false permits one pressed item and pressing it again clears the array; multiple=true toggles independent items. Items are native buttons aria-pressed. Group disabled and item disabled suppress changes; group size/variant context overrides item appearance when set, spacing defaults2. Standalone Toggle has pressed/defaultPressed boolean and onPressedChange(pressed,eventDetails), disabled, variant default|outline and size default|sm|lg. It is included from its own pinned source module, not lost as an unindexed dependency.

Native Enter/Space activates a toggle. ToggleGroup source composite uses horizontal arrows, Home/End and loopFocus=true by default; focus navigation alone does not press a toggle. IMPORTANT pinned wrapper limitation: orientation is consumed for visual/data layout and not forwarded to ToggleGroupPrimitive, so a requested vertical layout does not establish vertical primitive keyboard orientation. This reference uses horizontal groups and records the actual limitation instead of claiming vertical parity. Standalone Toggle has normal native Tab order.

[Originale React-Quellen und Versionen](../../sources/manifest.json), [nativer FIG-/PNG-Beleg](figma/figma-observations.json) und [tatsächliches Source-Prüfziel](provenance://source/apps%2Fshadcn-reference-lab%2FREADME.md). `release:false`; kein allgemeines Pixel-/Framework-/AT-Zertifikat.
