Breadcrumb

Show where a page sits and step back up the path.

Select a parent to go back.

Fig. 1 A path with its middle collapsed into a menu. Each step links back up; the last one is where you are.

When to use it

Use Breadcrumb on pages more than one level deep, such as a file inside a folder inside a project. It answers โ€œwhere am I?โ€ and gives a way back.

Collapse the middle of long paths into an ellipsis menu, and keep the first and last steps visible.

Sidebar

Where you are in the app.

Room to focus

Toggle the live navigation.

The main sections of an app.

Tabs

Views of one thing.

Website refresh

Active

Design studio ยท Updated today

Tasks12
Members3
Due dateOct 24

Overview, activity, and settings.

BreadcrumbThis page

The path back up.

Select a parent to go back.

Pages nested inside others.

Fig. 2 Three ways to move around. Pick by what people are moving between.

How it behaves

Compose BreadcrumbList with BreadcrumbItem, BreadcrumbLink, and BreadcrumbSeparator. End with BreadcrumbPage, which marks the current page with aria-current.

BreadcrumbLink renders an anchor by default. Use render={<Link />} to keep your router's client navigation.

Collapse long paths with BreadcrumbEllipsis, or hide parent items on narrow screens so the current page stays readable. The current page truncates rather than wrapping when the list is set to flex-nowrap.

Every item uses the medium label role in foreground text. Parent links show a soft fill on hover rather than changing color; separators and the ellipsis stay muted. Separators default to a chevron and accept any child.

Build it

Add it with the shadcn CLI:

Terminal

A complete example. Change the values to fit your product:

breadcrumb-example.tsx

The full source is yours to edit once installed:

breadcrumb.tsx