Breadcrumbs

SEO-friendly breadcrumb navigation with schema.

Tailwind CSS
<nav aria-label="Breadcrumb">
  <ol class="flex items-center gap-1.5 text-sm">
    <li><a href="#" class="text-slate-500 dark:text-slate-400 hover:text-indigo-600 font-medium transition-colors">Home</a></li>
    <li aria-hidden="true" class="text-slate-300">/</li>
    <li><a href="#" class="text-slate-500 dark:text-slate-400 hover:text-indigo-600 font-medium transition-colors">Gallery</a></li>
    <li aria-hidden="true" class="text-slate-300">/</li>
    <li aria-current="page" class="text-slate-900 dark:text-white font-bold">Glow Button</li>
  </ol>
</nav>

Free to use in personal and commercial projects. No attribution required.

About this breadcrumbs

Breadcrumbs show visitors where they are: Home / Gallery / Glow Button. They are navigation, orientation, and SEO in one element. Google displays breadcrumbs in search results and understands them via BreadcrumbList schema, which can improve how your pages appear.

This tailwind breadcrumb uses semantic ol/li markup with aria-label and aria-current, which is what accessibility and SEO both want. The separators are aria-hidden slashes; the current page is bold and not a link.

Keep breadcrumbs to 3-4 levels. If your hierarchy is deeper, the information architecture needs work, not longer breadcrumbs. On mobile, consider collapsing middle levels into an ellipsis.

Visitors increasingly arrive from search deep inside a site, with no sense of where they are or what sits above them. Breadcrumbs answer both in one line: Home / Gallery / Glow Button shows the path upward and offers a one-click escape to any parent level. They are wayfinding for the search-arrival era, when the homepage is no longer the front door.

The markup is a nav with aria-label=Breadcrumb wrapping an ol in flex items-center gap-1.5 text-sm. Links get text-slate-500 with hover:text-indigo-600; separators are li elements with aria-hidden=true so screen readers skip the slashes; the current page is an li with aria-current=page in font-bold and, crucially, not a link. That semantic structure is what accessibility and Google both want, and it pairs with BreadcrumbList JSON-LD for rich results.

Swap the slash separators for chevron SVGs for a more modern feel. Truncate long page titles with max-w and truncate so the trail never wraps to two lines. On mobile, collapse the middle levels into an ellipsis while keeping the first and current levels visible; the full trail matters less than the escape route.

The information-architecture mistake is mirroring the URL path exactly, including technical segments like /category/ or /page/2, which mean nothing to visitors. Breadcrumbs should reflect the logical hierarchy a human would describe (Home / Shoes / Running), not the routing structure. If the trail needs URL segments to make sense, the hierarchy itself needs work.

Design notes

When to use

Breadcrumbs pay off on deep sites where users arrive from search straight into a subpage and need to know where they are, like docs or a component gallery. They show the path upward in one line and give a quick escape to any parent level. The schema markup baked into this one also helps search engines display the trail in results.

What to avoid

Do not add breadcrumbs to flat sites with only one or two levels, they add noise without helping anyone. Avoid making the current page a link, it goes nowhere and confuses people who click it expecting something to happen. Also keep the labels short, a breadcrumb trail that wraps to two lines has too many levels to be useful.

Accessibility

The nav landmark with an aria-label and aria-current on the last item is exactly right, keep both. Make sure the separators are hidden from screen readers, which this one handles with aria-hidden.

Variants

Same component, different looks. Preview each one live and copy the code you like.

Chevrons

Chevron separators feel more modern than slashes on product sites.

Tailwind CSS

Contained

The contained pill works over hero images where text needs a backdrop.

Tailwind CSS

With home icon

A home icon saves space in deep navigation paths.

Tailwind CSS

Where to use it

  • ✓ E-commerce product pages
  • ✓ Documentation sites
  • ✓ Blog post headers
  • ✓ Gallery detail pages

Frequently asked questions

Do breadcrumbs help SEO?

Yes. They clarify site hierarchy for crawlers and Google can show them in search results. Add BreadcrumbList structured data for the full benefit.

How should breadcrumbs be marked up?

Use nav with aria-label=Breadcrumb containing an ordered list. Mark the current page with aria-current=page and do not link it.

When should I not use breadcrumbs?

On flat sites with no hierarchy, or where the user journey is linear (checkout flows). Breadcrumbs serve deep hierarchies.

How do I add BreadcrumbList schema to breadcrumbs?

Add a JSON-LD script with @type BreadcrumbList containing itemListElement entries, each a ListItem with position, name, and item URL. Search engines can then show your trail as rich breadcrumbs in results instead of the raw URL. Keep the schema trail identical to the visible one.

How do I make breadcrumbs responsive?

On small screens hide the middle crumbs and show only the first and last with an ellipsis between them, or collapse to a single back link to the parent page. Alternatively allow horizontal scrolling with overflow-x auto. The current page crumb should always remain visible.

How do I change the breadcrumb separator?

Style li + li::before with your chosen content: "/", "›", or an SVG chevron. Since separators are decorative, hide them from screen readers by keeping them in CSS rather than markup. Bootstrap-style frameworks expose a variable like --bs-breadcrumb-divider for the same purpose.

Customization tips

Use chevron SVG separators instead of slashes for a modern look. Add BreadcrumbList JSON-LD schema for SEO. Truncate long titles with max-w and truncate classes.