Toolbar is a grouping component for buttons and other content.
import { Toolbar } from 'primereact/toolbar';
<script src="https://unpkg.com/primereact/core/core.min.js"></script>
<script src="https://unpkg.com/primereact/toolbar/toolbar.min.js"></script>
Toolbar provides left and right templates to place content at these sections.
const leftContents = (
<React.Fragment>
<Button label="New" icon="pi pi-plus" className="mr-2" />
<Button label="Upload" icon="pi pi-upload" className="p-button-success" />
<i className="pi pi-bars p-toolbar-separator mr-2" />
<SplitButton label="Save" icon="pi pi-check" model={items} className="p-button-warning"></SplitButton>
</React.Fragment>
);
const rightContents = (
<React.Fragment>
<Button icon="pi pi-search" className="mr-2" />
<Button icon="pi pi-calendar" className="p-button-success mr-2" />
<Button icon="pi pi-times" className="p-button-danger" />
</React.Fragment>
);
<Toolbar left={leftContents} right={rightContents} />
Name | Type | Default | Description |
---|---|---|---|
id | string | null | Unique identifier of the element. |
style | string | null | Inline style of the component. |
className | string | null | Style class of the component. |
left | any | null | The template of left element. |
right | any | null | The template of right element |
Following is the list of structural style classes, for theming classes visit theming page.
Name | Element |
---|---|
p-toolbar | Main container element. |
p-toolbar-group-left | Left content container. |
p-toolbar-group-right | Right content container. |
This section is under development. After the necessary tests and improvements are made, it will be shared with the users as soon as possible.
None.
Built-in component themes created by the PrimeReact Theme Designer.
Premium themes are only available exclusively for PrimeReact Theme Designer subscribers and therefore not included in PrimeReact core.
Beautifully crafted premium create-react-app application templates by the PrimeTek design team.