Skip to main content Home About the Design SystemRoadmap OverviewDesignersDevelopers OverviewColorGridIconographyInteractionsSpacingTypography Overview Global colorBox shadowTypographyBorderOpacitySpaceLengthIconBreakpointsMedia queries All elements Accordion Alert Announcement Audio player Avatar Back to top Badge Blockquote Breadcrumb Button group Button Card Chip Code block Call to action Dialog Disclosure Footer Health index Icon Jump links Menu dropdown Navigation link Navigation (primary) Navigation (secondary) Navigation (vertical) Pagination PopoverPlanned Progress stepper Readtime Scheme toggle Select Site status Skeleton Skip link Spinner Statistic Subnavigation Surface Switch Table Tabs Tag Tile Timestamp Tooltip Video embed OverviewColor PalettesCustomizingDevelopers All PatternsAccordionAlertCall to ActionCardFilterFormLink with iconLogo wallSearch barSticky bannerSticky cardTabsTagTile All Personalization PatternsAnnouncement FundamentalsAccessibility toolsAssistive technologiesCI/CDContentContributorsDesignDevelopmentManual testingResourcesScreen readers Design/code status Release notes Get support

Button group

OverviewStyleGuidelinesCodeAccessibilityDemos
ImportingUsagerh-button-groupImportingUsagerh-button-group

Importing

Add rh-button-group to your page with this import statement:

<script type="module">
  import '@rhds/elements/rh-button-group/rh-button-group.js';
</script>
Copy to Clipboard Wrap lines

To learn more about installing RHDS elements on your site using an import map read our getting started docs.

Usage

<rh-button-group>
  <rh-button variant="primary">Save</rh-button>
  <rh-button variant="secondary">Cancel</rh-button>
  <rh-button variant="tertiary">More</rh-button>
</rh-button-group>

<script type="module">
  import "@rhds/elements/rh-button/rh-button.js";
  import "@rhds/elements/rh-button-group/rh-button-group.js";
</script>
Copy to Clipboard Wrap lines

rh-button-group

A button group visually organizes multiple related buttons into a single collection.

The component exposes role="group" via ElementInternals; authors do not need to set it.

For a toolbar pattern, wrap the group in an element with role="toolbar". When there is more than one toolbar, each must have an accessible name (aria-label or aria-labelledby). For vertical toolbars, set aria-orientation="vertical" on the toolbar element.

For further accessibility details, see the Accessibility documentation.

Slots 1

Slot Name Summary Description
[default]

Place <rh-button> elements or native <button> elements here to organize them into a button group. For toolbar semantics and labeling, wrap the group in an element with role="toolbar" and see the element accessibility documentation.
Note: [default] unnamed slots do not have a slot="name" attribute.

Attributes 0

None

Methods 0

None

Events 0

None

CSS Shadow Parts 0

None

CSS Custom Properties 0

None

Design Tokens 2

Token Description Copy
--rh-space-lg

16px spacer

Full CSS Variable Permalink to this token
--rh-space-md

8px spacer

Full CSS Variable Permalink to this token
© 2026 Red Hat Deploys by Netlify