- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Direction
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Menubar
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Toggle Group
- Tooltip
- Typography
Breadcrumb
Displays the path to the current resource using a hierarchy of links.
Installation#
pnpm add @ag/uiUsage#
import {
Breadcrumb,
BreadcrumbItem,
BreadcrumbLink,
BreadcrumbList,
BreadcrumbPage,
BreadcrumbSeparator,
} from "@ag/ui"<Breadcrumb>
<BreadcrumbList>
<BreadcrumbItem>
<BreadcrumbLink href="/">Home</BreadcrumbLink>
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem>
<BreadcrumbLink href="/components">Components</BreadcrumbLink>
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem>
<BreadcrumbPage>Breadcrumb</BreadcrumbPage>
</BreadcrumbItem>
</BreadcrumbList>
</Breadcrumb>Composition#
Use the following composition to build a Breadcrumb:
Breadcrumb
└── BreadcrumbList
├── BreadcrumbItem
│ └── BreadcrumbLink
├── BreadcrumbSeparator
├── BreadcrumbItem
│ └── BreadcrumbLink
├── BreadcrumbSeparator
└── BreadcrumbItem
└── BreadcrumbPageExamples#
Basic#
A basic breadcrumb with a home link and a components link.
Custom separator#
Use a custom component as children for <BreadcrumbSeparator /> to create a custom separator.
Dropdown#
You can compose <BreadcrumbItem /> with a <DropdownMenu /> to create a dropdown in the breadcrumb.
Collapsed#
We provide a <BreadcrumbEllipsis /> component to show a collapsed state when the breadcrumb is too long.
Link component#
To use a custom link component from your routing library, you can use the asChild prop on <BreadcrumbLink />.
RTL#
To enable RTL support in shadcn/ui, see the RTL configuration guide.
API Reference#
Breadcrumb#
The Breadcrumb component is the root navigation element that wraps all breadcrumb components.
| Prop | Type | Default |
|---|---|---|
className | string | - |
BreadcrumbList#
The BreadcrumbList component displays the ordered list of breadcrumb items.
| Prop | Type | Default |
|---|---|---|
className | string | - |
BreadcrumbItem#
The BreadcrumbItem component wraps individual breadcrumb items.
| Prop | Type | Default |
|---|---|---|
className | string | - |
BreadcrumbLink#
The BreadcrumbLink component displays a clickable link in the breadcrumb.
| Prop | Type | Default |
|---|---|---|
className | string | - |
BreadcrumbPage#
The BreadcrumbPage component displays the current page in the breadcrumb (non-clickable).
| Prop | Type | Default |
|---|---|---|
className | string | - |
BreadcrumbSeparator#
The BreadcrumbSeparator component displays a separator between breadcrumb items. You can pass custom children to override the default separator icon.
| Prop | Type | Default |
|---|---|---|
children | React.ReactNode | - |
className | string | - |
BreadcrumbEllipsis#
The BreadcrumbEllipsis component displays an ellipsis indicator for collapsed breadcrumb items.
| Prop | Type | Default |
|---|---|---|
className | string | - |