Button bar

The Button bar provides a organized way to present buttons side by side, which will stack up when there's not enough space.

UsageCodeAccessibility
DeleteEditSave
  <sl-button-bar align="center" aria-label="Actions group">
    <sl-button fill="outline" variant="danger"><sl-icon name="far-trash"></sl-icon>Delete</sl-button>
    <sl-button fill="outline" variant="default"><sl-icon name="far-file-pen"></sl-icon>Edit</sl-button>
    <sl-button fill="outline" variant="primary"><sl-icon name="far-floppy-disk"></sl-icon>Save</sl-button>
  </sl-button-bar>

API

Component has a range of properties to define the experience in different use cases.

Properties

NameAttributeTypeDefaultDescription
alignalign'start' | 'center' | 'end' | 'space-between' | undefined'start'The alignment of the buttons within the bar.
fillfill'solid' | 'outline' | 'link' | 'ghost' | undefinedundefinedDetermines the fill of all buttons in the bar.
reversereverseboolean | undefinedfalseWhen set to true, the button order is reversed.
sizesize'sm' | 'md' | 'lg' | undefinedundefinedDetermines the size of all buttons in the bar.
variantvariant'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted' | undefinedundefinedDetermines the variant of all buttons in the bar.

Slots

NameDescription
defaultButtons to be grouped in the bar.
Interactive example