Skip to main content

ButtonGroup

Displays multiple buttons in a layout.

string

Label for the button group that describes the content of the group for screen reader users to understand what's included.

"base" | "none"

The gap between elements.

Was this section helpful?

HTMLElement

The primary action button for the group. Accepts a single Button element with a variant of primary. Cannot be used when gap="none".

HTMLElement

Secondary action buttons for the group. Accepts Button elements with a variant of secondary or auto.

Was this section helpful?

Code

<s-button-group>
<s-button slot="primary-action">Save</s-button>
<s-button slot="secondary-actions">Cancel</s-button>
</s-button-group>

Preview