{
  "purpose": "Choose one or several pressed formatting tools, and describe standalone Toggle from the same native source family.",
  "avoid": "Pressed state, single selection and multiple selection are separate contracts.",
  "classification": "source-bound-reference-with-explicit-decisions",
  "basis": "Pinned React/primitive sources lead API, lifecycle and semantics; native visual observations and explicit reference decisions are mapped in figma/traceability.json.",
  "profile": "interactive-control/1",
  "profileRationale": "The family presents controls or navigation; static depictions do not establish an interactive contract.",
  "componentId": "shadcn:ToggleGroup",
  "sourceRule": "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.",
  "keyboardAndFocus": "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.",
  "sourceCommit": "45bbf9ba23c9c0f63d38887947e5fb06f59c7da3",
  "sourceFiles": [
    "sources/shadcn/apps/v4/registry/bases/base/ui/toggle-group.tsx.source",
    "sources/shadcn/apps/v4/content/docs/components/base/toggle-group.mdx.source",
    "sources/shadcn/apps/v4/registry/bases/base/examples/toggle-group-example.tsx.source",
    "sources/shadcn/apps/v4/registry/bases/base/ui/toggle.tsx.source",
    "sources/shadcn/apps/v4/content/docs/components/base/toggle.mdx.source",
    "sources/shadcn/apps/v4/registry/bases/base/examples/toggle-example.tsx.source"
  ],
  "primitiveDocs": [
    "sources/base-ui-1.9.0/docs/toggle.md.source",
    "sources/base-ui-1.9.0/docs/toggle-group.md.source"
  ],
  "referenceDecision": "Concrete formatting values remain arrays; standalone Toggle has its own boolean and module. Horizontal reference scope preserves the raw orientation limitation. Actual numeric --gap and CVA classes supply spacing/size/variant styling.",
  "visualContract": {
    "layoutPolicy": "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.",
    "parts": "component.json#/partBindings",
    "tokenBindings": "component.json#/visualContract/tokens",
    "sourceEvidence": "figma/traceability.json"
  }
}
