Primitives
The Toolbar primitive is a container for grouping related controls.
Import the Toolbar primitives from ng-primitives/toolbar.
import { NgpToolbar } from 'ng-primitives/toolbar';
Assemble the toolbar directives in your template.
<div ngpToolbar>
<!-- Toolbar content -->
</div>
Create a reusable component that uses the NgpToolbar directive.
Generate a reusable toolbar component using the Angular CLI.
ng g ng-primitives:primitive toolbar
path: The path at which to create the component file.prefix: The prefix to apply to the generated component selector.componentSuffix: The suffix to apply to the generated component class name.fileSuffix: The suffix to apply to the generated component file name. Defaults to component.exampleStyles: Whether to include example styles in the generated component file. Defaults to true.The following directives are available to import from the ng-primitives/toolbar package:
The following data attributes are applied to the ngpToolbar directive:
| Attribute | Description | Value |
|---|---|---|
data-orientation |
The orientation of the toolbar. | horizontal | vertical |
Adheres to the WAI-ARIA Toolbar Design Pattern.
Copyright © 2025 Angular Primitives