Simple container for headers, titles, actions and breadcrumbs.

adf toolbar 01


Basic Usage

<adf-toolbar title="Toolbar">
    <button mat-icon-button>
    <button mat-icon-button>


You can set the title content using an <adf-toolbar-title> 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 <adf-toolbar-divider> elements between your own elements to add a visual separator. Also, any content following a <div> element with the CSS class adf-toolbar--spacer will be pushed across to the right-hand side of the toolbar:

        <adf-breadcrumb ...></adf-breadcrumb>



    <div class="adf-toolbar--spacer"></div>


For example, the image below shows a toolbar with a Breadcrumb component title, and then some buttons pushed to the right by a spacer:

adf toolbar 02

Class members


NameTypeDefault valueDescription
colorThemePaletteToolbar color. Can be changed to empty value (default), primary, accent or warn.
titlestring""Toolbar title.


Dropdown menu

The following example shows how to create a dropdown menu. The code is based on the <mat-menu> component from the @angular/material library but you could also use your own custom menu components:

<adf-toolbar title="Toolbar">

    <button mat-icon-button [matMenuTriggerFor]="menu">
    <mat-menu #menu="matMenu">
        <button mat-menu-item>
        <button mat-menu-item disabled>
            <span>Check voicemail</span>
        <button mat-menu-item>
            <span>Disable alerts</span>

adf toolbar 03

With the menu set up like this, you would see the following menu items as defined earlier when you click the menu button:

adf toolbar 04

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:

For example:

adf toolbar 05

adf toolbar 06

adf toolbar 07

See also

© 2023 Alfresco Software, Inc. All Rights Reserved.