Getting StartedInstall and bootstrap headless foundations 4
LayoutHeadless structural primitives for expandable and container patterns 6
OverlayHeadless modal and floating layer behavior 3
FeedbackHeadless notification and status communication patterns 5
FormHeadless input and selection contracts 17
UtilityReusable action, identity, and clipboard behavior 6
NavigationHeadless trails, trees, menus, and command surfaces 7

Styling contract

Headless button toggle styling should target the group and item host attributes rather than assuming a wrapper structure.

SelectorApplied onPurpose
[data-slot='button-toggle-group']Group hostLayout shell for row, toolbar, or segmented-control styling.
[data-type='single'], [data-type='multiple']Group hostSwitch visual semantics between radio-like and pressed-button groups.
[data-slot='button-toggle'][data-selected='true']Toggle itemActive-state background, border, and text styling.
[data-slot='button-toggle'][data-focused='true']Toggle itemRoving focus ring when keyboard focus moves between items.
[data-slot='button-toggle'][data-disabled='true']Toggle itemMute unavailable items while keeping the group layout intact.

State selectors

button-toggle.contract.css

css
[data-slot="button-toggle-group"] {
  display: inline-flex;
}

[data-slot="button-toggle"][data-selected="true"] {
  background: #2563eb;
  color: #ffffff;
}

[data-slot="button-toggle"][data-focused="true"] {
  outline: 2px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

Example shells

The same primitive contract can drive a pill filter bar in plain CSS or Tailwind utilities.

Filter shell (Plain-CSS)

Filter