UI.MD

Breadcrumb

A navigation trail with separators, collapsible ellipsis, and a standalone back link for page headers.

Installation

$
npx shadcn@latest add https://ui.mattdowney.com/r/breadcrumb.json

Usage

import {
  Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink,
  BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, BreadcrumbBack,
} from "@/components/ui/breadcrumb"

Examples

Default

Back Link

A standalone “up one level” affordance for page headers. Use size="lg" at header scale.

Collapsed

Collapse the middle of a long trail behind an ellipsis.

Collapsed with Dropdown

Wrap the ellipsis in a dropdown to reveal the hidden crumbs.

API Reference

PropTypeDefaultDescription
renderBreadcrumbLink, BreadcrumbBackReact.ReactElement-Replaces the default <a> with your own element, e.g. render={<Link href="/" />}. Base UI merges props onto it.
sizeBreadcrumbBack"default" | "lg""default"default is inline/toolbar scale (14px); lg sits at page-header scale (20px). The chevron scales with it.
childrenBreadcrumbSeparatorReact.ReactNode-Overrides the default chevron separator, e.g. pass a / for a slash-style trail.