codefast/ui

Command Palette

Search for a command to run...

Source
Navigation

Breadcrumb

Hierarchical location trail. Supports custom separators, ellipsis, and asChild links.

Examples

Anatomy

How the parts nest — every slot the component exposes, in composition order.

Breadcrumb
└── BreadcrumbList
├── BreadcrumbItem
│ └── BreadcrumbLink
├── BreadcrumbSeparator
└── BreadcrumbItem
└── BreadcrumbPage

Features

  • BreadcrumbEllipsis collapses a long trail into a "…" marker — pair with a DropdownMenu to make the hidden crumbs reachable.
  • BreadcrumbLink's asChild renders your router's Link component while keeping breadcrumb semantics and hover styling.
  • BreadcrumbSeparator accepts any children to override the default chevron.

API reference

Props for each part of the component. All native element props are also forwarded.

Breadcrumb parts

Compose the trail from a list of items and separators.

BreadcrumbLinkReactNode

A navigable ancestor. Use asChild to render a router Link.

BreadcrumbPageReactNode

The current page — not a link; marked aria-current.

BreadcrumbSeparatorReactNode

Visual divider; defaults to a slash, override with any icon.

Accessibility

Built to be keyboard-navigable and screen-reader friendly out of the box.

  • Renders a nav landmark labelled “breadcrumb”.
  • BreadcrumbPage carries aria-current="page" for the final crumb.
  • Separators are decorative and hidden from assistive tech.

Guidelines

Conventions that keep usage consistent across an app.

Do

  • Reflect the real page hierarchy, ending in the current page.
  • Collapse long trails with an ellipsis on small screens.

Don’t

  • Don’t make the current page a link.
  • Don’t use breadcrumbs as primary navigation.

Explore further

Ready to integrate?

Follow the Getting Started guide to install @codefast/ui, or browse the full component gallery.