Code

<!-- pearl-breadcrumb.free.js: download it from the Install section below and host it with your site -->
<script src="/pearl-breadcrumb.free.js" defer></script>

<pearl-breadcrumb max="4" size="14" theme="light">
  <a href="/">Home</a>
  <a href="/clients">Clients</a>
  <a href="/clients/northwind">Northwind</a>
  <a href="/clients/northwind/invoices">Invoices</a>
  <a href="/clients/northwind/invoices/2026">2026</a>
  <a>Invoice 1042</a>
</pearl-breadcrumb>

In context

In a narrow card the middle folds by itself
Mint, a short path Pro

Install · Free Web Component

One file, no dependencies. Aurora preset, every other option included. Host it yourself so your visitors never load anything from our servers.

1. Install with one command — or download the file
shadcn CLI · React
npx shadcn@latest add https://www.ui-design.co/r/pearl-breadcrumb.json
2. Load it and use the element
HTML
<!-- pearl-breadcrumb.free.js: download it from the Install section below and host it with your site -->
<script src="/pearl-breadcrumb.free.js" defer></script>

<pearl-breadcrumb max="4" size="14" theme="light">
  <a href="/">Home</a>
  <a href="/clients">Clients</a>
  <a href="/clients/northwind">Northwind</a>
  <a href="/clients/northwind/invoices">Invoices</a>
  <a href="/clients/northwind/invoices/2026">2026</a>
  <a>Invoice 1042</a>
</pearl-breadcrumb>
3. React + TypeScript (optional)

The shadcn command adds a typed React wrapper for you. Using the file directly? Custom elements work in React as-is; for type checking add:

TypeScript
// pearl-breadcrumb.d.ts
declare namespace JSX {
  interface IntrinsicElements {
    'pearl-breadcrumb': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
      max?: number | string;
      open?: boolean | '';
      size?: number | string;
      theme?: 'light' | 'dark';
      sound?: boolean | '';
    };
  }
}

Pro · React + TypeScript Pro

One payment of $4.99, yours forever. Use it in unlimited personal and commercial projects; no resale.

  • React component (items with icons, max, onNavigate, open / onOpenChange) with TypeScript types and the full source
  • Sunset, Mint and Mono tints, plus custom tints from Brand Fit
  • The vanilla Web Component with every tint, a demo page, README and license

Attributes & props

NameTypeDefaultDescription
<a href> children—The levels, in order. The last child is the current page: it is shown pressed in, gets aria-current="page" and is never a link. An <svg> inside a link is kept as its icon.
max number0Most levels shown at once: the first one and the last max − 1 stay, the rest fold into the “…” chip. 0 shows as many as fit.
open booleanoffThe menu of folded levels is open. Fires toggle with detail.open when the user opens or closes it.
size number (px)14Text size; the chips, the chevrons and the menu scale with it.
aria-label string'Breadcrumb'Accessible name of the navigation.
theme 'light' | 'dark''light'For a light or a dark page; the component has no background of its own.
sound booleanoffA porcelain tap as the menu opens and closes. Also on for everything inside an element with data-ui-sound="on".
tint Pro'aurora' | 'sunset' | 'mint' | 'mono' | object'aurora'Colours of the light under the current page and of the glow a chip casts as it lifts, or a custom tint. Free build ships Aurora only.

The markup is what search engines and screen readers expect: a navigation landmark, an ordered list, one link per level and aria-current="page" on the last. Whatever max says, the path also folds when it is wider than its container — measured on the element, so it works inside a card or a sidebar — and unfolds when there is room again; if even “first … last” does not fit, the current page is cut with an ellipsis. The “…” chip is a button with aria-expanded: Enter or Down opens the menu, the arrows, Home and End walk it, Escape, Tab-ing away or a click outside closes it and hands focus back. Clicking a level fires a cancelable navigate event with detail.href and detail.label. Folded levels stay in the page as links (in the menu), so crawlers still see the whole path; add your own BreadcrumbList JSON-LD for rich results. All CSS, no WebGL.

More components