Breadcrumbs
Path from a section root to the current page. type text is the trail. type menu opens siblings.
Default
text is a slash-separated trail. menu paints each crumb as a compact control.
1
<Breadcrumb type="text">
2
<BreadcrumbItem href="/">Home</BreadcrumbItem>
3
<BreadcrumbItem href="/">Dashboard</BreadcrumbItem>
4
<BreadcrumbItem active>Overview</BreadcrumbItem>
5
</Breadcrumb>
6
<Breadcrumb type="menu">
7
<BreadcrumbItem>Home</BreadcrumbItem>
8
<BreadcrumbItem>Dashboard</BreadcrumbItem>
9
<BreadcrumbItem active>Overview</BreadcrumbItem>
10
</Breadcrumb>
Active
Mark the current page with active. That item gets aria-current page.
Disabled
A segment that belongs in the path but is not reachable.
Menu slot
On type menu, the menu slot fills DropdownMenuContent. Use DropdownMenuItem for each sibling.
Best practices
- Breadcrumbs orient, they do not replace primary nav. Three to five levels is enough; collapse the middle if the path is longer.
- The last crumb is the current page and gets
active. Earlier crumbs takehrefso they are real links. type="text"for a simple trail.type="menu"only when a crumb has siblings the user might jump to.- Disable a segment that exists in the hierarchy but has no page. Do not leave a dead
hrefthat 404s. - Labels are Title Case nouns that match the page title:
Projects,Settings. No “You are here”.