A toolbar is a container for grouping a set of controls, such as buttons, icon buttons and combobox search.
<nve-toolbar>
<nve-button><nve-icon name="add"></nve-icon> create</nve-button>
<nve-button><nve-icon name="delete"></nve-icon> delete</nve-button>
<nve-icon-button icon-name="gear" slot="suffix" aria-label="settings"></nve-icon-button>
</nve-toolbar>
Installation
<script type="module">
import '@nvidia-elements/core/toolbar/define.js';
</script>
<nve-toolbar>
<nve-button><nve-icon name="add"></nve-icon> create</nve-button>
<nve-button><nve-icon name="delete"></nve-icon> delete</nve-button>
<nve-icon-button icon-name="gear" slot="suffix" aria-label="settings"></nve-icon-button>
</nve-toolbar>
Groups
Complex toolbar with grouped controls including select dropdowns, button groups, and dividers for text editing scenarios.
<nve-toolbar>
<nve-select fit-text>
<select aria-label="element type">
<option value="1">Heading 1</option>
<option value="2">Heading 2</option>
<option value="p">Paragraph</option>
</select>
<div slot="option-1">
<span nve-text="heading">Heading 1</span>
</div>
<div slot="option-2">
<span nve-text="heading sm">Heading 2</span>
</div>
<div slot="option-3">
<span nve-text="body sm">Paragraph</span>
</div>
</nve-select>
<nve-divider></nve-divider>
<nve-button-group>
<nve-icon-button pressed icon-name="bars-3-bottom-left"></nve-icon-button>
<nve-icon-button icon-name="bars-3-bottom-right"></nve-icon-button>
<nve-icon-button icon-name="bars-4"></nve-icon-button>
</nve-button-group>
<nve-divider></nve-divider>
<nve-button-group>
<nve-icon-button icon-name="bold" size="sm"></nve-icon-button>
<nve-icon-button icon-name="italic" size="sm"></nve-icon-button>
<nve-icon-button icon-name="strikethrough" size="sm"></nve-icon-button>
</nve-button-group>
<nve-divider></nve-divider>
<nve-button-group>
<nve-icon-button icon-name="code"></nve-icon-button>
<nve-icon-button icon-name="fork"></nve-icon-button>
<nve-icon-button icon-name="merge"></nve-icon-button>
</nve-button-group>
<nve-button slot="suffix" container="flat">Save</nve-button>
</nve-toolbar>
Vertical
Controls the directional flow of the element's layout and interaction pattern.
Orientation Description horizontal Element orients horizontally with left-to-right flow. vertical Element orients vertically with top-to-bottom flow.
Vertical toolbar orientation with button groups and dividers for sidebar layouts.
<nve-toolbar orientation="vertical">
<nve-button-group>
<nve-icon-button pressed icon-name="bars-3-bottom-left"></nve-icon-button>
<nve-icon-button icon-name="bars-3-bottom-right"></nve-icon-button>
<nve-icon-button icon-name="bars-4"></nve-icon-button>
</nve-button-group>
<nve-divider></nve-divider>
<nve-button-group>
<nve-icon-button icon-name="bold" size="sm"></nve-icon-button>
<nve-icon-button icon-name="italic" size="sm"></nve-icon-button>
<nve-icon-button icon-name="strikethrough"></nve-icon-button>
</nve-button-group>
</nve-toolbar>
Flat
Demonstrates different container styles to accommodate visual weight and context.
Container Description flat Element has white space bounds but reduced visual container. inset Element container optimizes for embedding or inset placement inside another containing element. full Element container optimizes for filling its container bounds.
Toolbar with flat container styling for a more subtle appearance.
<nve-toolbar container="flat">
<nve-button><nve-icon name="add"></nve-icon> create</nve-button>
<nve-button><nve-icon name="delete"></nve-icon> delete</nve-button>
<nve-icon-button container="flat" icon-name="gear" slot="suffix" aria-label="settings"></nve-icon-button>
</nve-toolbar>
Inset
Demonstrates different container styles to accommodate visual weight and context.
Container Description flat Element has white space bounds but reduced visual container. inset Element container optimizes for embedding or inset placement inside another containing element. full Element container optimizes for filling its container bounds.
Toolbar with inset container styling and constrained width for contained layouts.
<nve-toolbar container="inset" style="--width: 300px">
<nve-button><nve-icon name="add"></nve-icon> create</nve-button>
<nve-button><nve-icon name="delete"></nve-icon> delete</nve-button>
<nve-icon-button icon-name="gear" slot="suffix" aria-label="settings"></nve-icon-button>
</nve-toolbar>
Full
Demonstrates different container styles to accommodate visual weight and context.
Container Description flat Element has white space bounds but reduced visual container. inset Element container optimizes for embedding or inset placement inside another containing element. full Element container optimizes for filling its container bounds.
Toolbar with full container styling that spans the entire width.
<nve-toolbar container="full">
<nve-button><nve-icon name="add"></nve-icon> create</nve-button>
<nve-button><nve-icon name="delete"></nve-icon> delete</nve-button>
<nve-icon-button container="flat" icon-name="gear" slot="suffix" aria-label="settings"></nve-icon-button>
</nve-toolbar>
Status
Communicates the intent and semantic meaning of an element to help users understand the outcome of their actions.
Status Description accent Highlights important actions or draws attention to primary interactive elements.
Toolbar with status styling showing selection state with accent status and default status variants for bulk actions.
<div nve-layout="column gap:lg align:horizontal-stretch full">
<nve-toolbar status="accent">
<nve-icon-button icon-name="cancel" slot="prefix"></nve-icon-button>
<p nve-text="body">123 selected</p>
<nve-button slot="suffix">delete</nve-button>
<nve-icon-button icon-name="more-actions" slot="suffix"></nve-icon-button>
</nve-toolbar>
<nve-toolbar>
<nve-icon-button icon-name="cancel" slot="prefix"></nve-icon-button>
<p nve-text="body">123 selected</p>
<nve-button slot="suffix">delete</nve-button>
<nve-icon-button icon-name="more-actions" slot="suffix"></nve-icon-button>
</nve-toolbar>
</div>
Release Status
All elements and features go through 3 phases of stability, pre-release, beta and stable.
pre-release
Docs Preview
API Documentation
Fully Themeable
beta
Robust unit test coverages
Passed API Review
Passed Designer VQA Review
Included in library package
stable
No known outstanding AA WCAG issues
No known outstanding performance issues
Adapts to different screen/container sizes
No breaking API changes for at least 90 days