Skip to content

Breadcrumbs

Where the page sits, as a trail of links ending in the page itself.

import { Breadcrumbs } from '@zitdevs/ui';

On the primary band, and in Spanish:

import * as es from '@zitdevs/ui/labels/es';
<Breadcrumbs
tone="primary"
labels={es.breadcrumbs}
items={[{ label: 'Inicio', href: '/es' }, { label: 'Legal' }, { label: 'Cookies' }]}
/>;

Through a router’s link, such as Next’s Link:

import Link from 'next/link';
<Breadcrumbs linkAs={Link} items={items} />;
Prop Type Default Notes
items readonly { label; href? }[] required Root first. The last is the current page, never linked.
tone 'light' | 'primary' 'light' primary on the primary hero band.
labels Partial<BreadcrumbsLabels> English { breadcrumbs }, the landmark’s name. es.breadcrumbs from labels/es.
linkAs LinkComponent 'a' Renders each ancestor’s link: Next’s Link, or any router’s.
ref Ref<HTMLElement> — The <nav>.
className string — Placement.
anything else <nav> attributes — Except aria-label, which labels sets.

Exported types: BreadcrumbsProps, BreadcrumbItem, BreadcrumbsLabels, and the label sets breadcrumbsLabels.

  • A <nav> landmark named “Breadcrumb” (“Ruta de navegación” in Spanish), holding an ordered list.
  • The last item is the current page: aria-current="page" and never a link, since a link to the page itself does nothing.
  • An ancestor with no page of its own has no href and reads as plain text.
  • The separators are hidden from assistive technology; the list already says where each step ends.
  • Each link draws the kit’s focus ring itself.

It needs none: links and a list. It holds no state and renders as a Server Component, through a router’s link too.

muted, ink and border-strong (the separators) on a light field; on-primary on the primary band; the focus ring.