npx shadcn@4.23.1 add @goop/meadow-breadcrumbBreadcrumb
FreeThe row of links from the top of the app down to the current page, so a person can step back up a level, for React and Tailwind CSS. Free, MIT.
What an agent sees
- BreadcrumbListThe trail itself, one row that never wraps
- BreadcrumbItemOne place on the trail
- BreadcrumbLinkA link to one ancestor page, inside a BreadcrumbItem
- BreadcrumbPageThe current page's name, in the last BreadcrumbItem
- BreadcrumbSeparatorThe mark between two places
- BreadcrumbEllipsisThree dots in a BreadcrumbItem for the ancestors a long trail leaves out
- BreadcrumbEllipsisMenuThe collapsed middle that opens
- BreadcrumbEllipsisMenuItemOne hidden step in a BreadcrumbEllipsisMenu
import { BreadcrumbEllipsis } from '@/components/ui/goop/breadcrumb';
import type { ReactNode } from 'react';
import {
Breadcrumb,
BreadcrumbEllipsisMenu,
BreadcrumbEllipsisMenuItem,
BreadcrumbItem,
BreadcrumbLink,
BreadcrumbList,
BreadcrumbPage,
BreadcrumbSeparator,
} from '@/components/ui/goop/breadcrumb';
function VisitTrail() {
return (
<Breadcrumb>
<BreadcrumbList>
<BreadcrumbItem>
<BreadcrumbLink href="/sites">Sites</BreadcrumbLink>
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem>
<BreadcrumbEllipsisMenu label="Two more levels">
<BreadcrumbEllipsisMenuItem href="/sites/north">North depot</BreadcrumbEllipsisMenuItem>
<BreadcrumbEllipsisMenuItem href="/sites/north/inspections">Inspections</BreadcrumbEllipsisMenuItem>
</BreadcrumbEllipsisMenu>
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem>
<BreadcrumbLink href="/sites/north/inspections/nov-2026">Nov 2026</BreadcrumbLink>
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem>
<BreadcrumbPage>W48</BreadcrumbPage>
</BreadcrumbItem>
</BreadcrumbList>
</Breadcrumb>
);
}
// `mark`: a pack icon from the theme's Glyph, `<Glyph icon="square" box={{ w: 12, h: 12 }} />`.
function FiledUnder({ mark }: { mark: ReactNode }) {
return (
<Breadcrumb>
<BreadcrumbList>
<BreadcrumbItem>
<BreadcrumbLink variant="plain" href="/site-visits" mark={mark}>
Site visits
</BreadcrumbLink>
</BreadcrumbItem>
</BreadcrumbList>
</Breadcrumb>
);
}Make the trail one to four places deep, collapse its middle into "…" and open it to reach the places it hides (the line under it says it is open), put a pack icon before its places, make the last place long enough to cut; press a place to go back to it. The trail goes nowhere: a press is only written under it.
When to use
- The row of links from the top of the app down to the current page, so a person can step back up a level.
- Also called: breadcrumbs.
Installation
Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Breadcrumb on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing.
npx shadcn@4.23.1 add @goop/meadow-breadcrumbAdd the Goop Breadcrumb to this project. The install steps are at https://goop.so/docs/install.mdUsage
import { BreadcrumbEllipsis } from '@/components/ui/goop/breadcrumb';
import type { ReactNode } from 'react';
import {
Breadcrumb,
BreadcrumbEllipsisMenu,
BreadcrumbEllipsisMenuItem,
BreadcrumbItem,
BreadcrumbLink,
BreadcrumbList,
BreadcrumbPage,
BreadcrumbSeparator,
} from '@/components/ui/goop/breadcrumb';
function VisitTrail() {
return (
<Breadcrumb>
<BreadcrumbList>
<BreadcrumbItem>
<BreadcrumbLink href="/sites">Sites</BreadcrumbLink>
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem>
<BreadcrumbEllipsisMenu label="Two more levels">
<BreadcrumbEllipsisMenuItem href="/sites/north">North depot</BreadcrumbEllipsisMenuItem>
<BreadcrumbEllipsisMenuItem href="/sites/north/inspections">Inspections</BreadcrumbEllipsisMenuItem>
</BreadcrumbEllipsisMenu>
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem>
<BreadcrumbLink href="/sites/north/inspections/nov-2026">Nov 2026</BreadcrumbLink>
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem>
<BreadcrumbPage>W48</BreadcrumbPage>
</BreadcrumbItem>
</BreadcrumbList>
</Breadcrumb>
);
}
// `mark`: a pack icon from the theme's Glyph, `<Glyph icon="square" box={{ w: 12, h: 12 }} />`.
function FiledUnder({ mark }: { mark: ReactNode }) {
return (
<Breadcrumb>
<BreadcrumbList>
<BreadcrumbItem>
<BreadcrumbLink variant="plain" href="/site-visits" mark={mark}>
Site visits
</BreadcrumbLink>
</BreadcrumbItem>
</BreadcrumbList>
</Breadcrumb>
);
}- Fits: schedule (its recipe).
- BreadcrumbLink: A crumb that opens a menu of the places beside it (a view, month or week picker): a
DropdownMenuTrigger asChildround<BreadcrumbLink asChild><button type="button">Calendar</button></BreadcrumbLink>— its chevron turns down under the pointer and while the menu is open. On the current place addaria-current="page"to the BreadcrumbLink: its words in the text colour, its chevron pointing down. A current page that opens nothing is a BreadcrumbPage. - height, width, padding, gap, corner, background, text, motion: add no class for these.
API reference
| Option | Type | What it does |
|---|---|---|
| Defaults | aria-label = 'Breadcrumb' |
| Part | What it is |
|---|---|
| BreadcrumbList | The trail itself, one row that never wraps |
| BreadcrumbItem | One place on the trail |
| BreadcrumbLink | A link to one ancestor page, inside a BreadcrumbItem; its children are that page's name; its props: breadcrumb--link.md |
| BreadcrumbPage | The current page's name, in the last BreadcrumbItem; plain words, not a link |
| BreadcrumbSeparator | The mark between two places |
| BreadcrumbEllipsis | Three dots in a BreadcrumbItem for the ancestors a long trail leaves out; label is read aloud; its props: breadcrumb--ellipsis.md |
| BreadcrumbEllipsisMenu | The collapsed middle that opens; its props: breadcrumb--ellipsis-menu.md |
| BreadcrumbEllipsisMenuItem | One hidden step in a BreadcrumbEllipsisMenu; its props: breadcrumb--ellipsis-menu-item.md |
BreadcrumbEllipsis
Three dots in a BreadcrumbItem for the ancestors a long trail leaves out; label is read aloud.
import { BreadcrumbEllipsis } from '@/components/ui/goop/breadcrumb';Options
- label?: string = 'More' — What the dots stand for, said to a reader (the dots alone are shown).
BreadcrumbLink
A link to one ancestor page, inside a BreadcrumbItem; its children are that page's name.
import { BreadcrumbLink } from '@/components/ui/goop/breadcrumb';Options
- mark?: ReactNode — A leading pack icon, drawn before the words: in the crumb's own 16 px icon box, or on the plain crumb in its small tile (give it a 12 px box there).
- variant?: 'crumb' | 'plain' = 'crumb' —
crumb(default): the trail's place, ending in its chevron. - Also takes: asChild?: boolean; href?: string
Keyboard
| Key | What it does |
|---|---|
| Tab | Move to the next crumb link |
| Enter | On a crumb: go to that page |
| Enter, Space or ArrowDown | On a crumb that is a menu's trigger (a view, month or week picker, the current place's too) open its menu |
| Enter, Space or ArrowDown | On the collapsed middle's dots open the menu of the hidden steps, its first step active |
| ArrowUp, ArrowDown, Enter | In that menu move between the hidden steps and go to the active one |
| Escape | Close that menu and give the focus back to the dots |
Accessibility
- The native element answers the keyboard.
- hover: the browser's own (:hover): write nothing
Its states are drawn from attributes and props, so assistive technology and your agent read the same thing:
| State | Drawn by |
|---|---|
| focus-visible | the attribute data-focus-visible |
| expanded | the attribute data-state=open |
| open | the attribute data-state=open |
| current | the attribute aria-current=page |
Motion
- The part sets its own motion: add no transition or animation of your own.
Notes for AI
Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.