Button Group

<wa-button-group> Stable 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

Examples

Link to This Section

Vertical Button Groups

Link to This Section

Set the orientation attribute to vertical to make a vertical button group.

Button Dropdown Item 1 Item 2 Item 3 Button

Pill Buttons

Link to This Section

Pill buttons are supported through the button's pill attribute.

Left Center Right

Left Center Right

Left Center Right

Left Center Right

Left Center Right
Link to This Section

Dropdowns can be placed into button groups.

Button Dropdown Item 1 Item 2 Item 3 Button

Split Buttons

Link to This Section

Create a split button using a button and a dropdown. Use a visually hidden label to ensure the dropdown is accessible to users with assistive devices.

Save Save Save as… Save all

Tooltips in Button Groups

Link to This Section

Buttons can be wrapped in tooltips to provide more detail when the user interacts with them.

Left Center Right I'm on the left I'm in the middle I'm on the right

Toolbar Example

Link to This Section

Create interactive toolbars with button groups.

Undo Redo Bold Italic Underline Align Left Align Center Align Right

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.

Attributes & Properties

Link to This Section

Learn more about attributes and properties.

CSS parts

Link to This Section

Learn more about CSS parts.

Need a hand? Report a bug Ask for help
    No results