Button bar
A button bar allows users to navigate between screens that start, continue or complete a task.
Also known as: button group, footer actions, form actions, page actions, toolbar
<bolt-button-bar>
<bolt-button slot="cancel">Cancel</bolt-button>
<bolt-button slot="back">Back</bolt-button>
<bolt-button slot="forward" type="solid">Continue</bolt-button>
</bolt-button-bar>
<bolt-button-bar>
<bolt-button slot="cancel">Cancel</bolt-button>
<bolt-button slot="forward" type="solid">Continue</bolt-button>
</bolt-button-bar>
<bolt-button-bar>
<bolt-button slot="forward" type="solid">Continue</bolt-button>
</bolt-button-bar>
<bolt-button-bar>
<bolt-button slot="cancel">Cancel</bolt-button>
<bolt-button slot="alternate">Skip step</bolt-button>
<bolt-button slot="back">Back</bolt-button>
<bolt-button slot="forward" type="solid">Continue</bolt-button>
</bolt-button-bar>
Alternate layouts
Permalink to "Alternate layouts"Fixed layout
Permalink to "Fixed layout"A button bar with a fixed layout will align the buttons to a .bolt-container grid class, which restricts content to a fixed width at each responsive breakpoint.
(The example below is best viewed at an extra-large breakpoint or higher.)
<bolt-button-bar layout="fixed">
<bolt-button slot="cancel">Cancel</bolt-button>
<bolt-button slot="back">Back</bolt-button>
<bolt-button slot="forward" type="solid">Continue</bolt-button>
</bolt-button-bar>
- The component is limited to no more than 4 buttons.
- Buttons are arranged using their respective
[slot]attributes as demonstrated in "Variations":cancelalternatebackforward
- The
forwardbutton MUST betype="solid". - To change the background color of the button bar, add a supported background color class to
<bolt-button-bar>.- NOTE: If the consumer chooses to overwrite the button's default color, it is up to them to ensure proper color contrast between the buttons and chosen background.
- Do not apply the
widthproperty to buttons within the button bar.- Button widths are pre-determined and should not be changed.
- The
layoutoptional property, can be used to adjust the button bar layout.- Setting
layout="fixed"restricts the button bar layout to a fixed width at each responsive breakpoint. layout="fluid"(default) aligns buttons to the left and right edges of the element.
- Setting
- It it up to consumers to ensure that button labels are concise, such that they fit on screen, horizontally.
General guidelines
Permalink to "General guidelines"- Button bar should be used for page navigation, progress saving, task submission, or task cancellation.
- Only use Buttons following best practices outlined in the Button component.
- Place the Primary Button on the right within a Button bar.
- Be mindful of how multiple Buttons will look and work on small screens.
- Use the default Button size (medium) for a Button bar.
- Buttons in a Button bar should be positioned immediately above a screen's basic Footer.
- Once introduced, a Button bar should persist throughout a task until that task is successfully submitted.
- Unless the focus is on a screen element that requires use, the Enter key on a keyboard can be used to trigger the action associated with the Primary Button in the Button bar.
- If a task requires significant time to complete, using the Button bar's Cancel Button should trigger the display of a modal, asking users to confirm whether they would like to abandon the task.
- Avoid placing content above a Button bar to announce the purpose of the next screen.
Button arrangement
Permalink to "Button arrangement"The arrangement of Buttons within a Button bar should be as follows:
Small viewport (from top-to-bottom):
Permalink to "Small viewport (from top-to-bottom):"- Forward
- Back
- Alternate
- Cancel
Large viewport (from left-to-right):
Permalink to "Large viewport (from left-to-right):"- Cancel
- Alternate
- Back
- Forward
Patterns
Permalink to "Patterns"Listed below are common variations of Button bar with suggested labels and positioning.
Forward only
Permalink to "Forward only"A screen that allows access to the first screen in a sequence
- Forward Button: "Start"
Cancel and Forward
Permalink to "Cancel and Forward"The first screen in a sequence
- Cancel Button: "Cancel"
- Forward Button: "Continue"
Cancel, Back, and Forward
Permalink to "Cancel, Back, and Forward"Any step past the first screen in a sequence
- Cancel Button: "Cancel"
- Back Button: "Back"
- Forward Button: "Continue" or "Submit" (last step only)
Cancel, Alternate, Back, and Forward
Permalink to "Cancel, Alternate, Back, and Forward"When users are allowed to save the progress they've made and continue a task at a later time
- Cancel Button: "Cancel"
- Alternate Button: "Save & quit"
- Back Button: "Back"
- Forward Button: "Continue" or "Submit" (last step only)
When users are allowed to skip a step in a multi-step process
- Cancel Button: "Cancel"
- Alternate Button: "Skip this step"
- Back Button: "Back"
- Forward Button: "Continue" or "Submit" (last step only)
When not to use
Permalink to "When not to use"- Don't use a Button Bar when applying actions to a selected table cell or list item.
- Consider using Button(s) outside of the Button bar if the action is not related to the progress or status of a task.
When to use something else
Permalink to "When to use something else"Do
- Have only one primary action in a Button bar.
- Respect Button order within a group.
- Place Primary Button on the right within a group of Buttons on desktop sized displays; reorder the Button group vertically with the Primary Button on top on mobile sized displays.
- Keep Buttons positioned consistently when using a Button bar.
- Use Button Bar for tasks requiring navigation between pages, saving progress, submitting a task, or canceling a task.
- Allow a Button bar to trigger any error messaging, and explain why they cannot navigate to the next screen.
Don't
- Don't place a Button below another Button if there's space to place them side-by-side.
- Don't exceed 4 buttons in a Button bar.
- Don't use Icons in Buttons or Icon-only Buttons in a Button Bar. Icons on Buttons should be reserved for triggering local actions, for example, print, add, or remove.
- Do not fix or "float" a Button bar above other screen elements. This prevents giving the false impression that the entirety of the content is displayed.
Content guidelines
Permalink to "Content guidelines"- Button labels use sentence case.
- Button labels should clearly describe the function of each button on the Button bar:
- Cancel: abandon the task at hand and navigate to the initial screen.
- Alternate: navigate away without consequences (e.g., "Save & quit" or "Skip this step").
- Back: navigate to the previous screen.
- Forward: navigate to the next screen, start a process or finalize a process (e.g., "Continue", "Save", "Submit").
Accessibility compliance
Permalink to "Accessibility compliance"-
WCAG 2.2 Compliant
-
JAWS 2025 Tested
-
NVDA 2025 Tested
-
VoiceOver Tested
-
Keyboard Tested
-
aXe Tested
All Bolt components have gone through accessibility testing, but please keep our accessibility guidelines in mind.