Skip to content

Breadcrumb

BetaNavigationOpen in the workshop

Where a detail page sits, with a way back up.

nav.xg-breadcrumb > ol > li > a | [aria-current="page"]

Example and markup

Live, from xg-ui.css and xg-ui.js. Switch the brand and mode on the example itself, or for the whole site in the header.

Breadcrumb
Markup
<nav class="xg-breadcrumb" aria-label="Breadcrumb">
<ol>
<li>
<a href="#">Campaigns</a>
</li>
<li>
<a href="#">Holiday promo — CTV</a>
</li>
<li>
<span aria-current="page">Creative 4</span>
</li>
</ol>
</nav>

When to use it

Use it for

detail pages two or more levels deep: Campaigns / Holiday promo / Creative 4.

Not for

top-level pages; as a replacement for the sidebar.

Rules

  • The last item is the current page and is not a link.
  • Truncate middle items on narrow screens, never the first or last.

Accessibility

  • <nav aria-label="Breadcrumb">, ordered list, aria-current="page" on the last item.

Every color pair this component uses is measured for both brands in light and dark on the Accessibility page.

Also in Navigation: Sidebar navigation, Topbar, Tabs, Wizard steps, Dropdown menu. Used in the patterns Reporting table.

Status Beta: usable; class names may still change in a minor release, with a note (see Releasing).