Design · Components · Navigation

Breadcrumb

Where you are, as a path you can walk back up.

Installation

Install the dependencies:

npm install @base-ui/react

Copy the source into components/ui/breadcrumb.tsx. Registry items that depend on it install it automatically.

components/ui/breadcrumb.tsx

Usage

import {
  Breadcrumb,
  BreadcrumbItem,
  BreadcrumbLink,
  BreadcrumbList,
  BreadcrumbPage,
  BreadcrumbSeparator,
} from "@/components/ui/breadcrumb";

export function Example() {
  return (
    <Breadcrumb>
      <BreadcrumbList>
        <BreadcrumbItem>
          <BreadcrumbLink href="/design">Design</BreadcrumbLink>
        </BreadcrumbItem>
        <BreadcrumbSeparator />
        <BreadcrumbItem>
          <BreadcrumbPage>Breadcrumb</BreadcrumbPage>
        </BreadcrumbItem>
      </BreadcrumbList>
    </Breadcrumb>
  );
}

Examples

Collapsed

BreadcrumbEllipsis stands in for levels that do not need to be spelled out.

API Reference

Parts

PartDescription
BreadcrumbThe nav landmark.
BreadcrumbListThe ordered list of levels.
BreadcrumbItemOne level.
BreadcrumbLinkA navigable level; compose with render for router links.
BreadcrumbPageThe current page, not a link.
BreadcrumbSeparatorThe divider glyph between levels.
BreadcrumbEllipsisPlaceholder for collapsed levels.