Toolbar
The default arrangement: reporting widgets on the leading edge, controls pushed to the trailing edge, and the content as an independent sibling below
| Reference | Entity | Status |
|---|---|---|
| 1041 | Ministry of Interior | Completed |
| 1042 | Ministry of Health | In Review |
| 1043 | Ministry of Education | Pending |
Multi-Row Toolbar
Pick this when the bar carries more controls than one line can hold, or when you want counts and actions on a line of their own regardless of viewport width
| Reference | Entity | Status |
|---|---|---|
| 1041 | Ministry of Interior | Completed |
| 1042 | Ministry of Health | In Review |
| 1043 | Ministry of Education | Pending |
Built-in Features
Anything you place in nds-bar-start sits at the leading edge, and nds-bar-end is pushed to the trailing edge at any bar width.
Wrap items in nds-bar-row to pin them to their own line. A row lays out exactly like the bar, so clusters and search fields behave the same inside one.
A row whose widgets are all hidden takes no space at all, so an applied-filters row leaves no gap above the content until a filter lands.
A search box dropped into the bar stretches to fill the free space on its line instead of rendering as the centered panel it is by default.
Search and filter button labels collapse to icons on small screens, keeping the bar's controls on one line without truncating them.
Set --toolbar-margin-block on any bar to change the space it clears above and below itself, without touching the component.
Usage Guidelines
Best Practices
- Use a toolbar directly above the content it controls: a Table, a card grid, or any list. Keep the content and its Pagination as independent siblings below
- The cluster names are positional, not semantic: put what leads in
nds-bar-startand what trails innds-bar-end, whatever those widgets do. A table bar usually reports from the start edge (a result count, applied-filter chips, a selection summary) and acts from the end edge (an Export group, a column menu, bulk actions); an editor bar leads with formatting controls and trails with a source toggle - A
nds-bar-rowearns its place when it has a sibling to break from — another row, or a widget sitting directly in the bar. A row that is its bar's only child pins no break: the bar has one line either way, so the wrapper reads as deliberate structure while doing nothing. Without any row the bar wraps on its own, which is the right behavior for two or three controls - Do not use a toolbar for page-level navigation or the page's primary action. Those belong in the section head, described on the Section page
- Do not nest a toolbar inside another toolbar. Add a
nds-bar-rowinstead, which is the same layout without the outer spacing - Every widget wires itself to its own content through a target attribute, so the bar imposes no structure on them. A custom layout built from Grid works too, but the toolbar keeps bars consistent across a product
- Leave the
hiddenattribute on widgets that ship empty, such as the applied-filters row. The bar reads it to collapse the line, and removing it leaves a permanent gap - Keep the trailing cluster to one or two controls. Group related buttons with
nds-btn-groupso they read as a single control rather than a row of choices - Match button sizes inside a cluster. A default button is 40px tall and
nds-mdis 32px, so mixing them leaves the cluster visibly uneven
Modifier Classes
| Class | Description |
|---|---|
nds-toolbar | The bar itself. A wrapping flex row that spans its container and clears space below |
nds-bar-row | Pins its children to a line of their own. Lays out identically to the bar, so clusters and search boxes work inside it |
nds-bar-start | Leading widget cluster. Groups its widgets so they space tighter than the bar's own gap |
nds-bar-end | Trailing widget cluster. Pushed to the end edge of whichever bar or row holds it |
nds-bar-text | Text item: a record count, a selection summary, a "showing 1–6 of 48" window. Sits on the bar's bottom edge, and works standalone outside a bar. A b inside it reads as medium emphasis |
CSS Custom Properties
| Property | Default | Description |
|---|---|---|
--toolbar-margin-block | 0 var(--spacing-4xl) | The bar's block margins, written as <start> <end>. Set it on the bar or an ancestor to change either edge |