On this page

Toggle group

When to use Toggle group, when to use something else, and tokens.

Draft. Ported from the shadcn-vue Toggle group and restyled with Beehexa tokens. Not yet approved; the API may still change.

A set of toggle buttons that can be on or off, joined like a button group.

When to use

  • Several options that are each on or off, such as filters or text styles.

When not to use

Tokens

Part Tokens
Items Beehexa toggle buttons: on uses button.background.selected and button.border.selected (D15)
Joined radius.control on the outer corners only, shared border.width.default lines (D2)
Spaced spacing × space.050 between items
Focus the Button focus ring (border.width.focused, color.border.focus, state.focus.offset)