Skip to content
Porcelana

Breadcrumb

Where-am-I trail; the last item is the current page.

Navigation

Example

Example.tsx
import { Breadcrumb } from "@porcelana/ui";

export default function Example() {
  return (
    <Breadcrumb
      items={[
        { label: "Home", href: "#" },
        { label: "Alarms", href: "#" },
        { label: "New alarm" }
      ]}
    />
  );
}

Import

Import
import { Breadcrumb } from "@porcelana/ui";
import "@porcelana/ui/styles.css"; // once, at your app root

Props

Generated from the TypeScript types. Standard HTML attributes are passed through and not listed.

Breadcrumb

The last item is the current page (aria-current="page").

PropTypeDefaultDescription
itemsrequiredBreadcrumbItem[]–Trail from the root to the current page; items without href render as text.
aria-labelstring–Defines a string value that labels the current element. @see aria-labelledby.
idstring–Element id. Generated automatically when omitted.
renderLink((item: BreadcrumbItem & { href: string; }, className: string) => ReactNode)–Custom link renderer for client-side routers.
separatorReactNode/Separator between items (hidden from screen readers). Defaults to "/".

Accessibility

  • A nav landmark named Breadcrumb with an ordered list; the last item has aria-current="page".
  • Separators are hidden from screen readers.

Mobile

  • Links have 44px targets and the trail wraps onto more lines.