Breadcrumb provides contextual information about page hierarchy.
import { BreadCrumb } from 'primereact/breadcrumb';
<script src="https://unpkg.com/primereact/core/core.min.js"></script>
<script src="https://unpkg.com/primereact/breadcrumb/breadcrumb.min.js"></script>
BreadCrumb uses the common menumodel api to define its items, visit MenuModel for details.
BreadCrumb requires a collection of menuitems as its model.
const items = [
{ label: 'Categories' },
{ label: 'Sports' },
{ label: 'Football' },
{ label: 'Countries' },
{ label: 'Spain' },
{ label: 'F.C. Barcelona' },
{ label: 'Squad' },
{ label: 'Lionel Messi', url: 'https://en.wikipedia.org/wiki/Lionel_Messi' }
];
const home = { icon: 'pi pi-home', url: 'https://www.primefaces.org/primereact' }
<BreadCrumb model={items} home={home}/>
| Name | Type | Default | Description |
|---|---|---|---|
| id | string | null | Unique identifier of the element. |
| model | MenuItem[] | null | An array of menuitems. |
| home | MenuItem | null | MenuItem configuration for the home icon. |
| style | string | null | Inline style of the component. |
| className | string | null | Style class of the component. |
Following is the list of structural style classes, for theming classes visit theming page.
| Name | Element |
|---|---|
| p-breadcrumb | Container element. |
| p-menuitem | Menuitem element. |
| p-menuitem-text | Label of a menuitem. |
| p-breadcrumb-chevron | Chevron element. |
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.