--- Title: Toolbar Component Added: v2.0.0 Status: Active Last reviewed: 2018-06-08 --- # [Toolbar Component](../../../lib/core/src/lib/toolbar/toolbar.component.ts "Defined in toolbar.component.ts") Simple container for headers, titles, actions and breadcrumbs. ![](../../docassets/images/adf-toolbar-01.png) ## Contents - [Basic Usage](#basic-usage) - [Transclusions](#transclusions) - [Class members](#class-members) - [Properties](#properties) - [Details](#details) - [Dropdown menu](#dropdown-menu) - [Custom color](#custom-color) - [See also](#see-also) ## Basic Usage ```html ``` ### [Transclusions](../../user-guide/transclusion.md) You can set the title content using an `` element (although you can also set a simple textual title with the `title` attribute). All other content in the toolbar is free-form but you can use one or more `` elements between your own elements to add a visual separator. Also, any content following a `
` element with the CSS class `adf-toolbar--spacer` will be pushed across to the right-hand side of the toolbar: ```html
``` For example, the image below shows a toolbar with a [Breadcrumb component](../../content-services/components/breadcrumb.component.md) title, and then some buttons pushed to the right by a spacer: ![](../../docassets/images/adf-toolbar-02.png) ## Class members ### Properties | Name | Type | Default value | Description | | ---- | ---- | ------------- | ----------- | | color | [`ThemePalette`](https://github.com/angular/components/blob/master/src/material/core/common-behaviors/color.ts) | | Toolbar color. Can be changed to empty value (default), `primary`, `accent` or `warn`. | | title | `string` | "" | Toolbar title. | ## Details ### Dropdown menu The following example shows how to create a dropdown menu. The code is based on the `` component from the `@angular/material` library but you could also use your own custom menu components: ```html ... ``` ![](../../docassets/images/adf-toolbar-03.png) With the menu set up like this, you would see the following menu items as defined earlier when you click the menu button: ![](../../docassets/images/adf-toolbar-04.png) ### Custom color Besides the default color you can use 'primary', 'accent', or 'warn' values: You might also want to change colors to follow your application's color [theme](../../user-guide/theming.md): For example: ![](../../docassets/images/adf-toolbar-05.png) ![](../../docassets/images/adf-toolbar-06.png) ![](../../docassets/images/adf-toolbar-07.png) ## See also - [Toolbar Divider component](toolbar-divider.component.md) - [Toolbar Title component](toolbar-title.component.md)