Side panel
A side panel is a persistent, side-by-side workspace that keeps supporting information and controls available while users continue their main task. It’s intended for ongoing parallel work—such as referencing details, inspecting data, filtering results, or editing attributes—where maintaining visibility and context improves accuracy and efficiency.
| Salt package | @salt-ds/core |
|---|---|
| Available since | 1.62.0 |
By default, a side panel anchors to the right edge of the screen. Consider using a right‑anchored side panel to surface contextual details and secondary tasks related to the current view—such as item details, comments, history, or quick edits. Always set the panel’s width to suit its content and ensure the main page stays visible and focusable while the panel is open.
Consider using a left‑anchored side panel for structure and exploration—such as hierarchical filters, folders, outlines, or multi‑facet filtering.
By default, the side panel styling uses variant="primary". Set variant="secondary" for a secondary side panel, variant="tertiary" for a tertiary side panel, or variant="none" to remove the default styling.
Use variant="none" when the side panel needs a custom visual treatment. This removes the default panel background and divider so the surrounding background can show through, or so you can compose your own container inside the panel.
Local affordances are in-context triggers that open side panels for quick tasks, typically placed close to what they affect so settings can be adjusted without losing sight of the primary page.
A side panel can be triggered via a page-level utility, for example a control in the app header that acts on the current page’s primary content:
A side panel can also be triggered via a control embedded within the main content area, usually scoped to a specific component or subset of data (e.g., a grid toolbar button, row‑level action, card menu):
For layouts that need more control over the side panel’s open/close behavior, use manual trigger management instead of SidePanelProvider. This is useful when the trigger and the panel can’t sit together in the component tree, or when open/close behavior needs to be driven by custom logic.
Manual trigger management makes it possible to:
- Place the trigger and the panel in different layout areas.
- Manage the panel’s open state with application state.
- Handle multiple panels with custom rules.
- Integrate with other components that control the panel state.
This approach trades convenience for flexibility: it requires more wiring, but enables more control over placement and behavior.
Side Panels can sit between content areas to create a multi-panel layout. When using multiple panels, ensure that the layout remains clear and that users can easily distinguish between different panels and their purposes.
Side Panels can contain scrollable content and still keep the main page visible and interactive. When using scrollable content within a panel, ensure the title and close button remain visible and accessible to users.