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

Toolbar supports two appearances: bordered or transparent. Transparent toolbars remove the default inset padding, so their contents align with the toolbar container edges. The default appearance is bordered.

Bordered toolbars are available in three variants: primary, secondary, and tertiary. The default variant is primary.

Controls must be placed into Tooltray trays to participate in grouping and overflow behavior.

Toolbar supports two positioning models:

  • Use align on Tooltray to place individual trays at the start, center, or end of the toolbar.
  • Use ToolbarContent with the position prop to define a content section that holds one or more Tooltray.

Use a Divider to separate groups of controls within a toolbar.

When the toolbar width is reduced and there isn't enough space for every control, trays move into overflow. Each tray collapses as a whole, keeping its controls grouped together.

Use overflowPriority to define a custom collapse order. Higher priority values collapse sooner. Tooltrays with higher overflowPriority values move into the overflow before those with lower values.

By default, overflowMode is "independent", so each Tooltray collapses on its own. As the toolbar width is reduced, trays move into the overflow one at a time, following their overflowPriority.

By default, trays collapse into a single shared overflow. Assign a named overflowGroup to move trays into their own overflow, each with its own overflow trigger.

Use overflowLabel when the overflow trigger label should differ from the group name.

Within a named overflow, set overflowMode to "grouped" on its trays to collapse them together as a single unit, rather than one at a time. Use this when trays are interdependent and should always appear together.