Skip to main content

Toolbar

Toolbar is a container that groups a set of related and interactive controls. It enables users to quickly access key functions relevant to the current context.

Salt package@salt-ds/core
Available since1.65.0
  • When using a transparent toolbar, avoid spanning the full width of a page unless it contains enough controls to be recognized as a toolbar. Otherwise, use a bordered toolbar.
  • Avoid controls that use arrow keys, like a text input, in the start or center position. If such a control is unavoidable, include only one and place it as the last control in the toolbar.
  • Use an aria-label when there is no visible label on the toolbar element and aria-labelledby when there is a visible label.
KeyFunction
Tab
  • If focus is before the toolbar, this action brings focus to the first control in the toolbar, or the last-focused control in the toolbar.
  • If a control in the toolbar has focus, this action moves focus out of the toolbar to the next interactive element in the tab order.
  • If a control that uses arrow keys, like a text input, has focus, this action moves focus to the next interactive element in the toolbar.
Shift + Tab
  • If focus is on an interactive element immediately after the toolbar, this action moves focus onto the last-focused control in the toolbar.
  • If a control in the toolbar has focus, this action moves focus out of the toolbar to the previous interactive element in the tab order.
  • If a control that uses arrow keys, like a text input, has focus, this action moves focus onto the previous interactive element in the toolbar.
Left arrow
  • Left arrow moves focus to the previous control in the toolbar. Focus wraps.
  • If focus is on a control that uses arrow keys, like a text input, this action follows the control's native behavior.
Right arrow
  • Right arrow moves focus to the next control in the toolbar. Focus wraps.
  • If focus is on a control that uses arrow keys, like a text input, this action follows the control's native behavior.