Breadcrumb

The trail of pages that leads to the current one, above a page title, with links, plain steps and the current page.

import { Breadcrumb } from "@plexui/ui/components/Breadcrumb";

Examples

Overview

Sizes

Separator

Long trails

API

PropTypeDefaultDescription
size"sm" | "md""md"Text size: sm above a compact header, md above a page title
separatorReactNodea small chevronWhat stands between two items
aria-labelstring"Breadcrumb"Name of the navigation landmark
classNamestring—Applied to the nav element

Other <nav> attributes are forwarded.

PropTypeDefaultDescription
hrefstring—Link destination. Internal paths use the linkComponent of PlexUIProvider
tostring—Router destination, for link components that take to
currentbooleanfalseThe current page: plain text marked aria-current="page"
onClick(event: MouseEvent) => void—Makes an item without a destination act as a button
classNamestring—Applied to the li element

Styling

Breadcrumb reads these component tokens. Override them at any scope to restyle it:

  • --breadcrumb-font-size: text size (--font-text-sm-size, or --font-text-xs-size at sm)
  • --breadcrumb-line-height: line height
  • --breadcrumb-gap: space around separators (spacing(1), or spacing(0.5) at sm)

Links use the secondary text color and turn to the text color on hover; the current page uses the text color; separators use the tertiary color.