Breadcrumbs
Breadcrumbs are a secondary navigation pattern that shows a user's current location within a hierarchy and lets them quickly jump back to any parent level.
Basic usage
Section titled “Basic usage”A breadcrumb trail shows the path from the root to the current page. On mobile (sm breakpoint), only the last link with a back chevron is shown.
Show code
<nav aria-label="breadcrumb" class="container-xl"> <ol class="flex gap-8 py-8"> <li class="until-md:hidden"> <a href="#" class="link-plain md:text-secondary">Home</a> <span class="until-md:hidden ml-8 text-secondary" role="presentation"> / </span> </li> <li class="until-md:hidden"> <a href="#" class="link-plain md:text-secondary">Cars</a> <span class="until-md:hidden ml-8 text-secondary" role="presentation"> / </span> </li> <li> <a href="#" class="link-plain md:text-secondary"> <span class="inline flex items-center h-1lh mr-4 md:hidden"> <img class="icon-sprite" width="12" height="12" role="presentation" aria-hidden="true" loading="lazy" alt="" src="https://www.volvocars.com/static/shared/icons/v5/chevron-back-16.svg" /> </span> XC90 </a> <span class="until-md:hidden ml-8 text-secondary" role="presentation"> / </span> </li> <li class="until-md:hidden"> <span role="link" aria-disabled="true" aria-current="page" tabindex="0"> Features </span> </li> </ol></nav>Responsive behavior
Section titled “Responsive behavior”| Breakpoint | Display |
|---|---|
sm |
Last trail link only, with back chevron icon |
md, lg, xl |
Full trail with separators, up to 5 pages |
Use until-md:hidden to hide elements on small screens and md:hidden to hide the chevron on larger screens.
Placement
Section titled “Placement”Position breadcrumbs left-aligned, directly above the page title or main content. This is the preferred placement. Breadcrumbs can also appear at the bottom of the page, after the content and above the footer, as a supplement to the top position. Keep the placement consistent across pages so users learn where to look for them.
Spacing
Section titled “Spacing”Breadcrumbs use 8px spacing above and below the component.
Accessibility
Section titled “Accessibility”- Use
<nav>element witharia-label="breadcrumb" - Use
<ol>for semantic ordered list structure - Mark current page with
aria-current="page" - Use
aria-disabled="true"for non-interactive current page - Separators should have
role="presentation"to hide from screen readers - Ensure keyboard navigation works with Tab and Enter
- Target size: trail links use a
40pxtarget size
CSS reference
Section titled “CSS reference”Breadcrumbs have no dedicated CSS block. They are built from utility classes and the link styles.
| Class | Description |
|---|---|
container-xl |
Constrains the <nav> to the page width |
flex, gap-8 |
Lays the trail items out in a row |
py-8 |
Vertical spacing above and below the trail |
link-plain |
Link without underline |
md:text-secondary |
Secondary link color from md and up |
text-secondary |
Secondary color for the separators |
until-md:hidden |
Hides trail items and separators on sm |
md:hidden |
Hides the back chevron from md and up |
icon-sprite |
Sizes the back chevron icon |
| Attribute | Description |
|---|---|
aria-label="breadcrumb" |
Names the <nav> landmark |
aria-current="page" |
Marks the current page |
aria-disabled="true" |
Marks the current page as non-interactive |
role="presentation" |
Hides separators and the chevron from assistive technology |