Font Awesome Build Awesome
Try SSR Server-side rendering (SSR) generates component HTML on the server before the page loads, improving SEO and initial load time. Use the switch to see Web Awesome components render with and without SSR.
Search this website ⌘KCtrl+K Light Dark System Docs Select Color Scheme Default Awesome Shoelace Active Brutalist Glossy Matter Mellow Playful Premium Tailspin Docs Select Theme View Project on GitHub Star Project on GitHub
Start Components Docs Help
Login Log into your account
Web Awesome Font Awesome Build Awesome
Search this site… /
Try SSR Server-side rendering (SSR) generates component HTML on the server before the page loads, improving SEO and initial load time. Use the switch to see Web Awesome components render with and without SSR.
Light Dark System Docs Select Color Scheme Default Awesome Shoelace Active Brutalist Glossy Matter Mellow Playful Premium Tailspin Docs Select Theme

Getting Started

  • Installation
  • Usage
  • Forms
  • Localization
  • Frameworks
  • Using with AI
  • Figma Design Kit ProThis requires access to Web Awesome Pro
  • Server Rendering

Resources

  • Accessibility
  • Browser Support
  • Contributing
  • Patterns ProPatterns require access to Web Awesome Pro
  • Migrating from Shoelace
  • Visual Tests
  • Changelog
  • Help & Support

Theming & Utilities

  • Overview
  • Built-in Themes
  • Color Palettes
  • Design Tokens
  • Customizing & Theming
  • CSS Utilities

Actions

  • Button
  • Button Group
  • Copy Button
  • Dropdown
    • Dropdown Item

Forms

  • Checkbox
  • Checkbox Group
  • Color Picker
  • Combobox ProThis requires access to Web Awesome Pro
  • Date Input ProThis requires access to Web Awesome Pro
  • Date Picker ProThis requires access to Web Awesome Pro
  • File Input ProThis requires access to Web Awesome Pro
  • Input
  • Known Date
  • Number Input
  • Radio Group
    • Radio
  • Rating
  • Select
    • Option
  • Slider
  • Switch
  • Textarea
  • Time Input
  • Data Grid Planned A Web Awesome Kickstarter stretch goal!

Layout

  • Accordion
    • Accordion Item
  • Card
  • Details
  • Dialog
  • Divider
  • Drawer
  • Page
  • Scroller
  • Split Panel

Navigation

  • Breadcrumb
    • Breadcrumb Item
  • Tab Group
    • Tab
    • Tab Panel
  • Tree
    • Tree Item

Feedback

  • Badge
  • Callout
  • Progress Bar
  • Progress Ring
  • Skeleton
  • Spinner
  • Tag
  • Toast ProThis requires access to Web Awesome Pro
  • Toast Item ProThis requires access to Web Awesome Pro
  • Tooltip

Media

  • Animated Image
  • Avatar
  • Carousel
    • Carousel Item
  • Comparison
  • Icon
  • Markdown
  • QR Code
  • Video ProThis requires access to Web Awesome Pro
  • Video Playlist ProThis requires access to Web Awesome Pro
  • Zoomable Frame

Data Viz ProThis requires access to Web Awesome Pro

  • Bar Chart
  • Bubble Chart
  • Doughnut Chart
  • Line Chart
  • Pie Chart
  • Polar Area Chart
  • Radar Chart
  • Scatter Chart
  • Sparkline
  • Advanced Usage

Helpers

  • Animation
  • Format Bytes
  • Format Date
  • Format Number
  • Include
  • Intersection Observer
  • Mutation Observer
  • Popover
  • Popup
  • Random Content
  • Relative Time
  • Resize Observer

Button Group

  • Examples
  • Orientation
  • Pill
  • Dropdowns
  • Split Buttons
  • Tooltips
  • Toolbars
  • Native Buttons
  • API
  • Importing
  • Slots
  • Attributes & Properties
  • CSS Parts
On This Page...
  • Examples
  • Orientation
  • Pill
  • Dropdowns
  • Split Buttons
  • Tooltips
  • Toolbars
  • Native Buttons
  • API
  • Importing
  • Slots
  • Attributes & Properties
  • CSS Parts

Button Group

<wa-button-group>
Stable Actions Since 2.0

Button groups combine related buttons into a single visual unit. Use them for toolbars, segmented controls, or any set of actions that belong together.

Left Center Right
<wa-button-group label="Alignment">
  <wa-button appearance="filled">Left</wa-button>
  <wa-button appearance="filled">Center</wa-button>
  <wa-button appearance="filled">Right</wa-button>
</wa-button-group>

Give every button group a label.
It isn't shown on screen, but assistive devices announce it so people know what the grouped buttons control.

Examples

Link to This Section

Orientation

Link to This Section

Set the orientation attribute to vertical to stack the buttons instead of placing them side by side.

Top Middle Bottom
<wa-button-group orientation="vertical" label="Options">
  <wa-button appearance="filled">Top</wa-button>
  <wa-button appearance="filled">Middle</wa-button>
  <wa-button appearance="filled">Bottom</wa-button>
</wa-button-group>

Pill

Link to This Section

Add the pill attribute to each button to round the group's outer edges.

Left Center Right
<wa-button-group label="Alignment">
  <wa-button appearance="filled" size="m" pill>Left</wa-button>
  <wa-button appearance="filled" size="m" pill>Center</wa-button>
  <wa-button appearance="filled" size="m" pill>Right</wa-button>
</wa-button-group>

Dropdowns

Link to This Section

Place a dropdown anywhere in the group to attach a menu of related actions.

Edit More Cut Copy Paste Delete
<wa-button-group label="Options">
  <wa-button appearance="filled">Edit</wa-button>
  <wa-dropdown>
    <wa-button appearance="filled" slot="trigger" with-caret>More</wa-button>
    <wa-dropdown-item>Cut</wa-dropdown-item>
    <wa-dropdown-item>Copy</wa-dropdown-item>
    <wa-dropdown-item>Paste</wa-dropdown-item>
  </wa-dropdown>
  <wa-button appearance="filled">Delete</wa-button>
</wa-button-group>

Split Buttons

Link to This Section

Pair a primary button with a dropdown to make a split button. Give the dropdown trigger an accessible label so people using assistive devices know what it opens.

Save Save Save as… Save all
<wa-button-group label="Save">
  <wa-button appearance="filled" variant="brand">Save</wa-button>
  <wa-dropdown placement="bottom-end">
    <wa-button appearance="filled" slot="trigger" variant="brand">
      <wa-icon name="chevron-down" label="More options"></wa-icon>
    </wa-button>
    <wa-dropdown-item>Save</wa-dropdown-item>
    <wa-dropdown-item>Save as&hellip;</wa-dropdown-item>
    <wa-dropdown-item>Save all</wa-dropdown-item>
  </wa-dropdown>
</wa-button-group>

Tooltips

Link to This Section

Pair each button with a tooltip to explain what it does on hover and focus.

Left Center Right Align left Align center Align right
<wa-button-group label="Alignment">
  <wa-button appearance="filled" id="button-left">Left</wa-button>
  <wa-button appearance="filled" id="button-center">Center</wa-button>
  <wa-button appearance="filled" id="button-right">Right</wa-button>
</wa-button-group>

<wa-tooltip for="button-left">Align left</wa-tooltip>
<wa-tooltip for="button-center">Align center</wa-tooltip>
<wa-tooltip for="button-right">Align right</wa-tooltip>

Toolbars

Link to This Section

Combine several button groups into a toolbar of related action sets. Use icon-only buttons with label for compact controls, and tooltips to name each one.

Undo Redo Bold Italic Underline Align left Align center Align right
<div class="button-group-toolbar wa-cluster">
  <wa-button-group label="History">
    <wa-button appearance="filled" id="undo-button"
      ><wa-icon name="undo" variant="solid" label="Undo"></wa-icon
    ></wa-button>
    <wa-button appearance="filled" id="redo-button"
      ><wa-icon name="redo" variant="solid" label="Redo"></wa-icon
    ></wa-button>
  </wa-button-group>

  <wa-button-group label="Formatting">
    <wa-button appearance="filled" id="button-bold"
      ><wa-icon name="bold" variant="solid" label="Bold"></wa-icon
    ></wa-button>
    <wa-button appearance="filled" id="button-italic"
      ><wa-icon name="italic" variant="solid" label="Italic"></wa-icon
    ></wa-button>
    <wa-button appearance="filled" id="button-underline"
      ><wa-icon name="underline" variant="solid" label="Underline"></wa-icon
    ></wa-button>
  </wa-button-group>

  <wa-button-group label="Alignment">
    <wa-button appearance="filled" id="button-align-left"
      ><wa-icon name="align-left" variant="solid" label="Align left"></wa-icon
    ></wa-button>
    <wa-button appearance="filled" id="button-align-center"
      ><wa-icon name="align-center" variant="solid" label="Align center"></wa-icon
    ></wa-button>
    <wa-button appearance="filled" id="button-align-right"
      ><wa-icon name="align-right" variant="solid" label="Align right"></wa-icon
    ></wa-button>
  </wa-button-group>
</div>

<wa-tooltip for="undo-button">Undo</wa-tooltip>
<wa-tooltip for="redo-button">Redo</wa-tooltip>
<wa-tooltip for="button-bold">Bold</wa-tooltip>
<wa-tooltip for="button-italic">Italic</wa-tooltip>
<wa-tooltip for="button-underline">Underline</wa-tooltip>
<wa-tooltip for="button-align-left">Align left</wa-tooltip>
<wa-tooltip for="button-align-center">Align center</wa-tooltip>
<wa-tooltip for="button-align-right">Align right</wa-tooltip>

Native Buttons

Link to This Section

Button groups also work with native <button> elements when Native Styles are included.

<wa-button-group label="Alignment">
  <button class="wa-filled">Left</button>
  <button class="wa-filled">Center</button>
  <button class="wa-filled">Right</button>
</wa-button-group>

API

Link to This Section

Importing

Link to This Section

If you're using the autoloader or a hosted project, components load on demand — no manual import needed. To cherry-pick a component manually, use one of the following snippets.

CDN npm Self-Hosted React

Import this component directly from the CDN:

import 'https://ka-f.webawesome.com/[email protected]/components/button-group/button-group.js';

After installing Web Awesome via npm, import this component:

import '@awesome.me/webawesome/dist/components/button-group/button-group.js';

If you're self-hosting Web Awesome, import this component from your server:

import './webawesome/dist/components/button-group/button-group.js';

To import this component for React 18 or below, use the following code:

import WaButtonGroup from '@awesome.me/webawesome/dist/react/button-group/index.js';

Slots

Link to This Section

Learn more about using slots.

Name Description
(default) One or more <wa-button> elements to display in the button group.

Attributes & Properties

Link to This Section

Learn more about attributes and properties.

Name Description Reflects
label
label
A label to use for the button group. This won't be displayed on the screen, but it will be announced by assistive devices when interacting with the control and is strongly recommended.
Type string
Default ''
orientation
orientation
The button group's orientation.
Type 'horizontal' | 'vertical'
Default 'horizontal'

CSS Parts

Link to This Section

Learn more about CSS parts.

Name Description CSS selector
base The component's base wrapper. ::part(base)
Need a hand? Report a bug Ask for help
Go Make Something Awesome
Version 3.10.0 © Fonticons, Inc.
  • Terms
  • Privacy
  • Refunds
  • Core License
  • Pro License

Quick Links

  • Components
  • CSS Utilities
  • Theming
  • Using with AI
  • Changelog
  • Help & Support

Recent Searches

    D'oh! No results for “”

    Suggest on GitHub Ask on Discord
    Navigate Select
    Close Esc

    We Have Cookies…

    We use cookies to make webawesome.com work better by storing limited information about your usage.

    We value your privacy, so we won't use them for evil or ask you to join the dark side.

    Customize
    Necessary Only Accept All
    Strictly Necessary
    Required to make the site function correctly — cannot be turned off
    Functionality Analytics
    Cancel Confirm Cookie Choices