Skip to content
Focsd homeFocsd homeFocsd
Forms

Button group

Visually joins related buttons and names the group.

  • Tag: focsd-button-group
  • Pattern: Group
  • Category: Actions

Example

Previous Next
HTML
<focsd-button-group label="Pagination">
<focsd-button>Previous</focsd-button>
<focsd-button>Next</focsd-button>
</focsd-button-group>

Usage

Import the module once, then use the tag like any HTML element. Every framework below renders the same element; see Frameworks for setup.

<script type="module">
import '@focsd-dev/components/focsd-button-group.js';
</script>
<focsd-button-group label="Pagination">…</focsd-button-group>

API

Attributes

AttributePropertyTypeDefault
labellabelstring—

Slots

SlotDescription
(default)Default content.

CSS parts

Style the inside of the component with ::part(), for example focsd-button-group::part(group).

PartDescription
groupThe group element.

Accessibility

  • A role="group" with aria-label; each button stays its own tab stop.
  • For a single tab stop with arrow keys, use a toolbar instead.