Clear path navigation for nested pages and flows.
npx shadcn@latest add @iconiq/breadcrumbs"use client";
import { Home } from "lucide-react";
import { Breadcrumbs } from "@/components/ui/breadcrumbs";
const items = [
{ label: "Home", href: "/", icon: <Home className="size-3.5" /> },
{ label: "Components", href: "/components" },
{ label: "Breadcrumbs" },
];
export function BreadcrumbsPreview() {
return (
<Breadcrumbs
className="w-full max-w-xl"
maxItems={4}
items={items}
/>
);
}ariaLabelAccessible label for the root nav landmark. Override for localization.
Type string·Default "Breadcrumb"
classNameMerged onto the nav element for placement inside headers, toolbars, and page shells.
Type string
itemsOrdered trail segments with label, optional href, icon, and title fields.
Type BreadcrumbItemData[]
maxItemsWhen the trail exceeds this count, middle segments collapse into BreadcrumbEllipsisMenu.
Type number
truncateApplies max-width truncation to linked and current-page labels.
Type boolean·Default false
separatorCustom separator content passed to each BreadcrumbSeparator in the generated trail.
Type ReactNode
renderLinkOptional custom link renderer for framework routers such as Next.js Link.
Type (props) => ReactNode
siteUrlAbsolute site origin used when BreadcrumbJsonLd is emitted alongside the trail.
Type string
currentPathFallback path for the final breadcrumb item in JSON-LD when it has no href.
Type string
listClassNameMerged onto the internal BreadcrumbList element.
Type string
classNameMerged with the default flex wrapping, spacing, and muted text styles.
Type string
classNameMerged with the inline-flex item layout. Dynamic items should receive stable React keys when rendered from arrays.
Type string
hrefDestination for the linked segment. You can also compose a router link with the render prop.
Type string
renderOptional Base UI render override for composing with framework-specific links while preserving merged props.
Type ReactElement | render function
truncateApplies responsive max-width truncation with an optional title tooltip.
Type boolean·Default false
titleNative title attribute for truncated or abbreviated link labels.
Type string
classNameMerged with the default focus ring, color transition, and hover foreground treatment.
Type string
truncateApplies responsive max-width truncation to the label.
Type boolean·Default false
titleNative title attribute for truncated labels.
Type string
classNameMerged with the default foreground current-page text style.
Type string
childrenOptional custom separator content. When omitted, ChevronRightIcon is rendered.
Type ReactNode
classNameMerged with the default icon sizing class for separator icons.
Type string
classNameMerged with the default 20px square centered icon layout.
Type string
itemsCollapsed segments rendered inside the overflow menu. Each item accepts an optional icon.
Type BreadcrumbEllipsisMenuItem[]
menuLabelAccessible label for the overflow trigger button.
Type string·Default "Show collapsed breadcrumb items"
classNameMerged onto the relative menu wrapper.
Type string
itemsTrail labels and optional href values.
Type BreadcrumbJsonLdItem[]
siteUrlAbsolute site origin used to resolve relative breadcrumb URLs.
Type string
currentPathFallback path for the final breadcrumb when it has no href.
Type string·Default "/"
The compound API keeps semantic breadcrumb structure while layering Motion on top.
BreadcrumbList wraps the trail in an ordered list.
BreadcrumbLink exposes a visible focus ring for keyboard users.
BreadcrumbPage marks the final segment with aria-current='page'.
BreadcrumbEllipsisMenu uses aria-expanded, aria-haspopup, and Escape to dismiss.
Install the exact registry entry shown on the right when you want the component file and its declared runtime dependencies together.
Dependencies: @base-ui/react, motion, lucide-react.
Contact
Additionally, if you find any bug or issue, feel free to raise an issue.