Installation
$ pnpm dlx shadcn@latest add @synccn/breadcrumbFirst time in this project? Connect synccn with one command.
Usage
import { Breadcrumb } from "@/components/ui/breadcrumb";<Breadcrumb items={[{ label: "Home" }, { label: "Docs" }]} />API reference
Generated from the component's TypeScript types, so it always matches the code.
Breadcrumb
items: [{ label, href?, icon? }] — the last item is the current page.
PropTypeDescription
- itemsrequired
BreadcrumbItem[]Path from root to the current page (last item).
- separator
"chevron" | "slash"Default
"chevron"Divider style.
- renderLink
(item: BreadcrumbItem, children: React.ReactNode) => React.ReactNodeRender links with your router's Link component.
- className
stringExtra classes for the root element.
Dependencies
Read from the component's imports when the site builds. The CLI installs all of these for you.
Helpers
- lib/utilscn (merges class names)
npm packages
- clsx for cn()
- tailwind-merge for cn()
- lucide-react for ChevronRight, Slash
Accessibility
- Wrapped in a nav labelled Breadcrumb; the last item is the current page.
From the source
Read from this component's code when the site builds, so it can't drift.
- ARIA attributes: aria-current, aria-label
More navigation
PaginationPage numbers with ellipses for long ranges.StepperProgress through a multi-step flow.DockApp dock that magnifies icons near the pointer.Navigation MenuSite navigation with mega-menu panels.SidebarCollapsible app sidebar with groups, badges and nested items.Scroll ProgressReading progress bar for the page or any scroll container.