Easy Shadcn
Components

Breadcrumb

Breadcrumb flattens shadcn's Breadcrumb markup into a single items-driven component: each item describes a label and an optional href, instead of hand-writing nested BreadcrumbList / BreadcrumbItem / BreadcrumbLink / BreadcrumbSeparator structures. The last item becomes the current page automatically, and long trails can collapse into an ellipsis.

Installation

With the @easy-shadcn namespace configured:

pnpm dlx shadcn@latest add @easy-shadcn/breadcrumb

Or install via the full URL (zero configuration):

pnpm dlx shadcn@latest add https://easy-shadcn.vercel.app/r/breadcrumb.json

Props

PropTypeDefaultDescription
itemsBreadcrumbItem[]-Trail definitions — see the table below.
separatorReactNodechevronOverrides the content rendered between items.
maxItemsnumber-Maximum items to display. When items.length exceeds it, the breadcrumb shows the first item, an ellipsis, and the last maxItems - 1 items.
listClassNamestring-Class override for BreadcrumbList.
itemClassNamestring-Class override applied to every BreadcrumbItem.
linkClassNamestring-Class override applied to every BreadcrumbLink.
pageClassNamestring-Class override for the current BreadcrumbPage.
separatorClassNamestring-Class override applied to every BreadcrumbSeparator.

All other props (className, aria-label, etc.) are forwarded to the underlying nav.

FieldTypeDescription
labelReactNodeItem content.
hrefstringRenders a link. Omit it to render plain text.
currentbooleanForces this item to render as the current page. Defaults to the last item.

Notes

  • The current page is detected automatically: the last item renders as a non-interactive BreadcrumbPage (aria-current="page"). Set current on any item to override this — once any item is explicitly current, the last item is no longer auto-selected.
  • The current page is never a link, even if it has an href.
  • For client-side routing (Next.js <Link>, React Router), pass the link element as label and omit href, or compose the components/ui/breadcrumb primitives directly. The flat href renders a plain <a>.
  • items must be homogeneous. For interactive ellipsis menus or per-item custom markup, compose the primitives directly instead.

On this page