Button Group
Displays multiple buttons in a layout.
Anchor to propertiesProperties
- Anchor to accessibilityLabelaccessibilityLabelstring
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?
Anchor to slotsSlots
- Anchor to primary-actionprimary-actionHTMLElement
The primary action button for the group. Accepts a single Button element with a
variant
ofprimary
. Cannot be used when gap="none".- Anchor to secondary-actionssecondary-actionsHTMLElement
Secondary action buttons for the group. Accepts Button elements with a
variant
ofsecondary
orauto
.
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>
Examples
Code
Default
<s-button-group> <s-button slot="primary-action">Save</s-button> <s-button slot="secondary-actions">Cancel</s-button> </s-button-group>