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 since | 1.65.0 |
- To organize related controls, such as actions, commands, or filters.
- To improve the discoverability of related controls.
- To provide a consistent, predictable location for related controls within a page, panel, or section.
- For placing controls that are not directly related to the current context or content.
- As primary navigation between major sections or pages. Instead, use
Navigation item. - To display only one control.
- To display a brand logo, navigation, and utility actions. Instead, use
App header.
- Follow the respective content guidance for all components used inside a toolbar.
- Always place controls inside
Tooltray. Both composition models require it. - For simple toolbars, place
Tooltraydirectly insideToolbar. Use thealignprop to position each tray at thestart,center, orend. - When a position needs multiple
Tooltraycomponents, dividers, custom spacing, or content-level props, wrap them inToolbarContentand set thepositionprop. - Use one composition model per toolbar.
To import Toolbar and related components from the core Salt package, use:
import { ToolbarContent, Toolbar, Tooltray } from "@salt-ds/core";