Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Breadcrumbs

ProNew

A trail that stays on one line: the middle of a long path folds into a menu and long labels truncate.

Installation

pnpm dlx shadcn@latest add @viewport/breadcrumbs

First time? Add the @viewport registry to components.json. Setup takes one minute.

Usage

The code behind the preview above comes with Truffle Pro.

Props

PropTypeDefault
items*Crumb[]

The path, from the root to the current page. The last item is the current page and is not a link.

—
maxItemsnumber

The most items shown before the middle of the path folds into a menu.

4
renderLink(props: { href: string; className: string; children: React.ReactNode }) => React.ReactNode

Render links with your router's component, e.g. `(props) => <Link {...props} />`.

—

Accessibility

  • A nav landmark with an ordered list; the last item has aria-current=page.
  • The folded levels are in a named menu.
  • Separators are hidden from screen readers and flip in right-to-left layouts.