Talisman LogoTalisman Logo Design System
Browse documentation
Components

Breadcrumb

A trail of links from the root of the product to the current page, so users know where they are and can go back up a level.

Stableimport { Breadcrumb } from "@repo/ui/breadcrumb";Source

Earlier levels are links. The last item is the current page and is not a link.

The links in these previews point to a section of the same page (#id). They are real anchors, so they can be focused and activated, without sending you to another page. In an app, wrap the app’s router link with asChild (see Code).

When to use

  • In pages that sit two or more levels deep: a process, then a task, then a document.
  • When the user can reach the same page from several places and needs a stable path back up.
  • In the top bar of the application frame, next to the page title.

When not to use

  • Switching between views of the same page. Use Tabs.
  • Moving through a list of results. Use Pagination.
  • Primary navigation between sections. Use the Sidebar.
  • Pages one level below the root. A “Voltar” link or the page title is enough.

Anatomy

Part Role
Breadcrumb The nav landmark. Name it with aria-label.
BreadcrumbList The ordered list that holds the items.
BreadcrumbItem One level.
BreadcrumbLink A previous level. Renders an a, or your router link with asChild.
BreadcrumbPage The current page. Marked with aria-current="page".
BreadcrumbSeparator The / between levels. Hidden from assistive technology.
BreadcrumbEllipsis A visual stand-in for hidden levels. It is not interactive (see Known issues).

Examples

Three levels

Shortened path

Replace middle levels with BreadcrumbEllipsis on deep paths. Keep the first level and the last two.

Two levels

Content

  • Use the name of the page as it appears in its title: “Tarefas”, “Revisar contestação”.
  • Use a process number only when it is the page’s name, as in “0001234-56.2024.8.26.0100”.
  • Keep labels short. Long names wrap onto a new line because the list wraps.
  • Pass a translated aria-label on Breadcrumb, such as “Você está em”.
  • In apps, links use CustomLink through asChild, never next/link directly.

Do and don’t

DoEnd with the current page as plain text. It names where the user is.
Don'tDon't link the current page. It looks clickable and goes nowhere.

Accessibility

  • Breadcrumb renders a nav element, so it is a navigation landmark. Its default name is the English word “breadcrumb”: pass a translated aria-label.
  • The path is an ordered list (ol), so screen readers announce the number of levels.
  • BreadcrumbPage sets aria-current="page", which identifies the current level.
  • BreadcrumbSeparator has aria-hidden and role="presentation", so the “/” is not read aloud.
  • Links are standard anchors: Tab moves between them and Enter follows them. There is no custom keyboard handling.
  • BreadcrumbEllipsis is hidden from assistive technology, so hidden levels cannot be reached by keyboard or screen reader.

Code

import {
  Breadcrumb,
  BreadcrumbItem,
  BreadcrumbLink,
  BreadcrumbList,
  BreadcrumbPage,
  BreadcrumbSeparator,
} from "@repo/ui/breadcrumb";
import CustomLink from "components/CustomLink";

<Breadcrumb aria-label="Você está em">
  <BreadcrumbList>
    <BreadcrumbItem>
      <BreadcrumbLink asChild>
        <CustomLink href="/tasks">Tarefas</CustomLink>
      </BreadcrumbLink>
    </BreadcrumbItem>
    <BreadcrumbSeparator />
    <BreadcrumbItem>
      <BreadcrumbPage>Revisar contestação</BreadcrumbPage>
    </BreadcrumbItem>
  </BreadcrumbList>
</Breadcrumb>;

Props

Breadcrumb
PropTypeDefaultDescription
aria-labelstringbreadcrumbAccessible name of the navigation landmark. Overrides the default `breadcrumb`; pass translated copy from the app
BreadcrumbLink
PropTypeDefaultDescription
asChildbooleanfalseRenders the child element (the app's router link) instead of an `a`.
hrefstring—Destination. Standard anchor attribute.
BreadcrumbList, BreadcrumbItem, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis
PropTypeDefaultDescription
classNamestring—Extra classes. Accepted by every part; use it for layout only.

Known issues

Issue Effect
BreadcrumbLink has a hover style but no focus-visible style. Keyboard users rely on the browser’s default outline, which varies between browsers and themes.
BreadcrumbLink has no padding: the hit area is the 20px line of text-sm text. Below the 24px minimum. Harder to hit with a mouse.
BreadcrumbPage renders an a with aria-disabled="true" and tabIndex={0}. It is a keyboard stop that does nothing, and it is announced as a disabled link.
BreadcrumbEllipsis is aria-hidden and not a button or a menu, and its “More” text is hardcoded English. Hidden levels cannot be opened or reached, and the string cannot be translated.
Breadcrumb defaults to aria-label="breadcrumb". An app that forgets to override it exposes an English landmark name.
BreadcrumbEllipsis.displayName is "BreadcrumbElipssis". The component shows a misspelled name in React DevTools.
BreadcrumbList and BreadcrumbPage set size and weight with raw classes (text-sm, font-normal), not Typography. The text does not follow the type scale tokens.
Edit this page on GitHub