Toolbar

Toolbar is a grouping component for buttons and other content.


import Toolbar from 'primevue/toolbar';

Toolbar provides start, center and end properties to place content at these sections.



<Toolbar>
    <template #start>
        <Button label="New" icon="pi pi-plus" class="mr-2" />
        <Button label="Upload" icon="pi pi-upload" severity="success" />
        <i class="pi pi-bars p-toolbar-separator mr-2" />
        <SplitButton label="Save" icon="pi pi-check" :model="items" severity="warning"></SplitButton>
    </template>

    <template #end>
        <Button icon="pi pi-search" class="mr-2" />
        <Button icon="pi pi-calendar" severity="success" class="mr-2" />
        <Button icon="pi pi-times" severity="danger" />
    </template>
</Toolbar>

Following is the list of structural style classes, for theming classes visit theming page.

NameElement
p-toolbarMain container element.
p-toolbar-group-startStart content container.
p-toolbar-group-centerCenter content container.
p-toolbar-group-endEnd content container.

Screen Reader

Toolbar uses toolbar role to the root element, aria-orientation is not included as it defaults to "horizontal". Any valid attribute is passed to the root element so you may add additional properties like aria-labelledby to define the element if required.

Keyboard Support

Component does not include any interactive elements. Arbitrary content can be placed with templating and elements like buttons inside should follow the page tab sequence.