The Breadcrumb component displays the path to the current resource using a hierarchy of links.
Usage
import { Breadcrumb } from 'components/lib';
function MyComponent({ ...props }){
const items = [
{ name: 'Home', url: '/' },
{ name: 'Dashboard', url: '/dashboard' },
{ name: 'Settings', url: '/dashboard/settings' }
];
return (
<div>
<Breadcrumb items={ items } />
</div>
);
}
Props
| Prop | Description | Required | Value |
|---|---|---|---|
| items | array of breadcrumb items | required | array of objects ({ name: string, url: string }) |
Notes
- The
Breadcrumbcomponent uses theBreadcrumbList,BreadcrumbItem,BreadcrumbLink,BreadcrumbPage,BreadcrumbSeparator, andBreadcrumbEllipsissub-components. - The
itemsprop specifies the list of breadcrumb items, each containing anameandurl. - The
BreadcrumbSeparatorcomponent provides a separator between breadcrumb items, defaulting to a right chevron icon. - The
BreadcrumbEllipsiscomponent can be used to indicate more items in the breadcrumb path. - For more details, refer to the Shadcn Breadcrumb documentation.