Default
Home, Components, and the page you are on. Point at Components: links wear the highlighter. The current page is bold and underlined twice in blue felt.
The path to the page you are on, written in a notebook: names between pencil slashes, links that wear the highlighter when pointed at, and the current page underlined twice in blue felt. Swap the slash for a chevron or any node, and fold the middle of a long path into a dropdown.
npx shadcn@latest add @wobko/breadcrumbFirst time here? Add the registry to components.json first. How to install
Home, Components, and the page you are on. Point at Components: links wear the highlighter. The current page is bold and underlined twice in blue felt.
The middle of a long path folded into an ellipsis that opens a dropdown of the hidden crumbs (the ellipsis is the trigger, so it is a real button with a name).
A pencil slash is the default. Children replace it: a drawn chevron, an arrow, a dot. Links can also be your router's element with asChild.
A real use: the crumbs are the folders you have opened. Click one to go back up; when the path is longer than four names the middle folds into an ellipsis whose menu takes you there too.
Any crumb can be a DropdownMenuTrigger: here the middle name is a button with a little chevron, and its menu lists the sibling pages. It wears the highlighter while it is open, like a link does when you point at it.
The shadcn demo of BreadcrumbEllipsis: three pencil dots stand in for the middle of a long path. On its own it is only decoration, hidden from screen readers; wrapped in a link or button it needs an aria-label, and then it can lead to the full list.
BreadcrumbLink asChild hands the highlighter, spacing and focus ring to whatever element you give it. Here that is a Link that changes the path without loading a page (a stand-in for next/link, React Router or TanStack Router); the trail is built from the path.
A deep path keeps its first and last two crumbs and folds the rest. The fold opens a dropdown on a wide screen and a drawer on a phone, from one component: the query is read with useSyncExternalStore, so the server renders the wide version and a phone swaps after hydration.
A link on the path (an `a`, or your router link with `asChild`). Pointed at or keyboard-focused it wears the highlighter.
| Prop | Type | Default | Description |
|---|---|---|---|
| asChild | boolean | false | Render your element (Next's Link, a router NavLink). |
The page you are on: bold, `aria-current="page"`, underlined twice in blue felt (one pencil line in calm density). The underline is the only drawing in a breadcrumb; it becomes an ink host once it is measured.
| Prop | Type | Default | Description |
|---|---|---|---|
| seed | string | number | - | Pins the hand. Default: derived from useId(). |
The files the CLI copies into your project.
Loading the source