Toggle

A button that stays down. Distinct from Switch: a Switch commits a setting, a toggle button holds a mode you are working in — a filter, a view, a formatting state.

Single toggle

Sizes and icon-only

Group — single select

Borders collapse into one another so the group reads as one control. aria-pressed on each member is what actually communicates the state; the visual join is decoration.

Icon group

Where this is used

The theme and density controls in this site’s header are two ToggleGroups. Flipping one changes an attribute on <html> and every token downstream re-resolves — which is as good a demonstration of the component as any example on this page.