Skip to content

Breadcrumb

Show where a page sits in a hierarchy.

NavigationWayfinding
npx shadcn@latest add @silicon-ui/breadcrumb

Installation

With the shadcn CLI

npx shadcn@latest add @silicon-ui/breadcrumb

Manually

  1. Install the dependencies

    npm install @radix-ui/react-dropdown-menu lucide-react motion
  2. Copy these files into your project

    • components/silicon-ui/breadcrumb/breadcrumb.tsx
    • components/silicon-ui/breadcrumb/breadcrumb.module.css

    Shared with other components. Skip any you already have.

    • components/silicon-ui/lib/silicon-provider.tsx
    • components/silicon-ui/dropdown-menu/dropdown-menu.tsx
    • components/silicon-ui/dropdown-menu/dropdown-menu.module.css
    • components/silicon-ui/lib/menu-highlight.tsx
    • components/silicon-ui/lib/fluid-hover.tsx
  3. Add the foundation, once per app, for the design and motion tokens

    npx shadcn@latest add @silicon-ui/silicon-foundation

Usage

usage.tsx
import { Breadcrumb } from "@/components/silicon-ui/breadcrumb/breadcrumb";

API reference

PropTypeDefault
items*

The path from the top level to the current page, which is the last item (unless `includesCurrent` is false).

BreadcrumbItem[]—
includesCurrent

Experimental. Whether the last item is the current page (default true). False makes every item a link back up and marks none as current: for a page bar whose title already names the page, `items` can be the parent alone.

booleantrue
ariaLabel

The navigation landmark's name (default "Breadcrumb").

string"Breadcrumb"
maxItems

Experimental. The most crumbs to show, at least 2. A longer path shows the first crumb, a "…" menu of the levels between, and the last `maxItems - 1` crumbs. By default the path never collapses.

number—

Dependencies

npm
@radix-ui/react-dropdown-menulucide-reactmotion
Registry
silicon-motion-tokensdropdown-menu