Breadcrumb

Displays the path to the current resource using a hierarchy of links.

Overview

The Breadcrumb component provides hierarchical navigation that shows users their current location within a website or application structure. It offers support for links, icons, custom separators, and menu-backed overflow composition while leaving path data and routing with the consumer.

Usage

import {
  Breadcrumb,
  BreadcrumbIcon,
  BreadcrumbItem,
  BreadcrumbLabel,
  BreadcrumbLink,
  BreadcrumbList,
  BreadcrumbOverflowItem,
  BreadcrumbOverflowMenu,
  BreadcrumbPage,
  BreadcrumbSeparator,
} from "@tilt-legal/cubitt-components/breadcrumb";
<Breadcrumb>
  <BreadcrumbList>
    <BreadcrumbItem>
      <BreadcrumbLink href="/">Home</BreadcrumbLink>
    </BreadcrumbItem>
    <BreadcrumbSeparator />
    <BreadcrumbItem>
      <BreadcrumbLink href="/components">Components</BreadcrumbLink>
    </BreadcrumbItem>
    <BreadcrumbSeparator />
    <BreadcrumbItem>
      <BreadcrumbPage>Breadcrumb</BreadcrumbPage>
    </BreadcrumbItem>
  </BreadcrumbList>
</Breadcrumb>

Examples

Basic

A simple breadcrumb with links and the current page.

With Icon

Use icons as breadcrumb links, such as a home icon for the root page.

Overflow Menu

Use BreadcrumbOverflowMenu when collapsed path items should be selectable. It owns the menu shell and trigger styling while the consumer composes the menu items and decides what each hidden folder does.

Custom Separator

Customize the separator between breadcrumb items.


API Reference

The root breadcrumb component. Renders a nav element with aria-label="breadcrumb".

PropTypeDefaultDescription
classNamestring-Additional CSS classes to apply

Extends all standard HTML nav element props.

Container for breadcrumb items. Renders an ol element.

PropTypeDefaultDescription
classNamestring-Additional CSS classes to apply

Extends all standard HTML ol element props.

Individual breadcrumb item container. Renders a li element.

PropTypeDefaultDescription
classNamestring-Additional CSS classes to apply

Extends all standard HTML li element props.

Breadcrumb link component. Renders an a element by default.

PropTypeDefaultDescription
renderReactElement-Custom element to render as the link
hrefstring-Link destination
classNamestring-Additional CSS classes to apply

Extends all standard HTML a element props.

Inline icon slot for links, pages, and overflow triggers.

PropTypeDefaultDescription
classNamestring-Additional CSS classes to apply

Extends all standard HTML span element props.

Truncating label slot for icon-and-label breadcrumb content.

PropTypeDefaultDescription
classNamestring-Additional CSS classes to apply

Extends all standard HTML span element props.

Menu shell for collapsed path segments. It renders the overflow trigger and menu content while leaving each menu item composed by the consumer.

PropTypeDefaultDescription
childrenReactNode-Menu item composition.
triggerPropsobject-Props passed to BreadcrumbOverflowTrigger.
contentPropsobject-Props passed to the internal menu content.

Also accepts primitive Menu props.

Menu item wrapper for BreadcrumbOverflowMenu.

PropTypeDefaultDescription
classNamestring-Additional CSS classes to apply

Also accepts primitive MenuItem props.

Low-level trigger for collapsed path segments. BreadcrumbOverflowMenu uses this by default.

PropTypeDefaultDescription
renderReactElement-Custom element to render as the trigger
iconReactNode<FolderDots />Leading icon. Pass null to hide it.
showChevronbooleantrueShows the trailing chevron.
chevronReactNode<ChevronDown />Custom trailing indicator.
classNamestring-Additional CSS classes to apply

Extends all standard HTML button element props.

Represents the current page in the breadcrumb. Renders a span element with aria-current="page".

PropTypeDefaultDescription
classNamestring-Additional CSS classes to apply

Extends all standard HTML span element props.

Visual separator between breadcrumb items. Renders a li element with role="presentation".

PropTypeDefaultDescription
childrenReact.ReactNodeChevronRightCustom separator content
classNamestring-Additional CSS classes to apply

Extends all standard HTML li element props. By default, renders a ChevronRight icon that rotates in RTL layouts.

Presentational ellipsis for collapsed breadcrumbs when no menu trigger is needed.

PropTypeDefaultDescription
childrenReact.ReactNodeDotsCustom ellipsis content
classNamestring-Additional CSS classes to apply

Extends all standard HTML span element props.

On this page