|$ curl https://forge-ai.dev/api/markdown?path=docs/components/breadcrumbs
$cat docs/breadcrumbs.md
updated Recentlyยท16 min readยทpublished

Breadcrumbs

โ—†CSSโ—†HTMLโ—†Tailwindโ—†Bootstrapโ—†UIโ—†Navigationโ—†Intermediate๐ŸŽฏFree Tools
Introduction

Breadcrumb navigation shows users their location within a site hierarchy and provides a path back to parent pages. This guide covers production-ready breadcrumb patterns in plain HTML/CSS, Tailwind CSS, and Bootstrap โ€” including slash and chevron separators, icon labels, ellipsis truncation, dropdown siblings, pill styles, and accessible markup.

โ„น

info

Wrap every breadcrumb in a <nav> element with aria-label="Breadcrumb" so assistive technologies distinguish it from primary navigation.
Basic Breadcrumbs

Simple text-based breadcrumbs with a slash separator. The current page is non-interactive and visually distinct from clickable ancestors. This is the most common pattern for documentation sites and blogs.

basic-breadcrumbs
Live
untitled.html
HTML
1<nav class="breadcrumbs" aria-label="Breadcrumb">
2 <ol>
3 <li>
4 <a href="#">
5 Home
6 </a>
7 </li>
8 <li>
9 <a href="#">
10 Products
11 </a>
12 </li>
13 <li>
14 <a href="#">
15 Electronics
16 </a>
17 </li>
18 <li aria-current="page">
19 Wireless Headphones
20 </li>
21 </ol>
22</nav>
preview
Chevron Separators

SVG chevron icons as separators provide a cleaner, more modern look than text characters. Inline SVGs also scale crisply at any size and inherit the surrounding text color.

chevron-breadcrumbs
Live
untitled.html
HTML
1<nav class="breadcrumbs chev" aria-label="Breadcrumb">
2 <ol>
3 <li>
4 <a href="#">
5 <svg width="14" height="14" viewBox="0 0 24 24" fill="none"
6 stroke="currentColor" stroke-width="2" stroke-linecap="round"
7 stroke-linejoin="round">
8 <path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>
9 <polyline points="9 22 9 12 15 12 15 22"/>
10 </svg>
11 <span>
12 Home
13 </span>
14 </a>
15 </li>
16 <li>
17 <a href="#">
18 Documentation
19 </a>
20 </li>
21 <li>
22 <a href="#">
23 Components
24 </a>
25 </li>
26 <li aria-current="page">
27 Breadcrumbs
28 </li>
29 </ol>
30</nav>
preview
With Icons

Adding contextual icons next to breadcrumb labels helps users quickly identify each level. Use small inline SVGs for recognition. This pattern works well in file managers and CMS admin interfaces where each level has a distinct type.

icon-breadcrumbs
Live
untitled.html
HTML
1<nav class="breadcrumbs icons" aria-label="Breadcrumb">
2 <ol>
3 <li>
4 <a href="#">
5 <svg width="14" height="14" viewBox="0 0 24 24" fill="none"
6 stroke="currentColor" stroke-width="2" stroke-linecap="round"
7 stroke-linejoin="round">
8 <path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>
9 </svg>
10 </a>
11 </li>
12 <li>
13 <a href="#">
14 <svg width="14" height="14" viewBox="0 0 24 24" fill="none"
15 stroke="currentColor" stroke-width="2" stroke-linecap="round"
16 stroke-linejoin="round">
17 <path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/>
18 </svg>
19 <span>
20 Projects
21 </span>
22 </a>
23 </li>
24 <li>
25 <a href="#">
26 <svg width="14" height="14" viewBox="0 0 24 24" fill="none"
27 stroke="currentColor" stroke-width="2" stroke-linecap="round"
28 stroke-linejoin="round">
29 <polyline points="16 18 22 12 16 6"/>
30 <polyline points="8 6 2 12 8 18"/>
31 </svg>
32 <span>
33 Source Code
34 </span>
35 </a>
36 </li>
37 <li aria-current="page">
38 <svg width="14" height="14" viewBox="0 0 24 24" fill="none"
39 stroke="currentColor" stroke-width="2" stroke-linecap="round"
40 stroke-linejoin="round">
41 <path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"/>
42 <polyline points="13 2 13 9 20 9"/>
43 </svg>
44 <span>
45 index.tsx
46 </span>
47 </li>
48 </ol>
49</nav>
preview
Back to Parent

A minimal "back to parent" pattern keeps mobile headers uncluttered. The single ancestor link is paired with the current page title, giving users one-tap access to the previous level without a full hierarchy.

back-to-parent
Live
untitled.html
HTML
1<nav class="back-bc" aria-label="Breadcrumb">
2 <a href="#" class="back-link">
3 <svg width="14" height="14" viewBox="0 0 24 24" fill="none"
4 stroke="currentColor" stroke-width="2" stroke-linecap="round"
5 stroke-linejoin="round">
6 <polyline points="15 18 9 12 15 6"/>
7 </svg>
8 <span>
9 Back to Projects
10 </span>
11 </a>
12 <span aria-current="page">
13 Deploy Pipeline
14 </span>
15</nav>
preview
Collapsed with Ellipsis

For deep hierarchies, collapse middle items into a clickable ellipsis button. This saves horizontal space while keeping the root and current page visible at all times. Hovering the ellipsis reveals the hidden items in a dropdown, preserving the full path context.

collapsed-breadcrumbs
Live
untitled.html
HTML
1<nav class="breadcrumbs collapsed" aria-label="Breadcrumb">
2 <ol>
3 <li>
4 <a href="#">
5 Home
6 </a>
7 </li>
8 <li class="collapsed-item">
9 <button type="button" class="ellipsis-btn"
10 aria-label="Show hidden breadcrumbs">
11 ยทยทยท
12 </button>
13 <div class="collapsed-dropdown">
14 <a href="#">
15 Library
16 </a>
17 <a href="#">
18 Media
19 </a>
20 <a href="#">
21 Images
22 </a>
23 <a href="#">
24 Uploads
25 </a>
26 </div>
27 </li>
28 <li>
29 <a href="#">
30 Projects
31 </a>
32 </li>
33 <li>
34 <a href="#">
35 Website Redesign
36 </a>
37 </li>
38 <li>
39 <a href="#">
40 Assets
41 </a>
42 </li>
43 <li aria-current="page">
44 hero-banner.png
45 </li>
46 </ol>
47</nav>
preview
Compact Pill Style

Compact breadcrumb pills with backgrounds on each segment. Works well in toolbars, dashboards, and narrow sidebar layouts where vertical space is at a premium. The active item uses a green accent background.

compact-breadcrumbs
Live
untitled.html
HTML
1<nav class="breadcrumbs pill-bc" aria-label="Breadcrumb">
2 <ol>
3 <li>
4 <a href="#">
5 Home
6 </a>
7 </li>
8 <li>
9 <a href="#">
10 Dashboard
11 </a>
12 </li>
13 <li>
14 <a href="#">
15 Analytics
16 </a>
17 </li>
18 <li aria-current="page">
19 Revenue Report
20 </li>
21 </ol>
22</nav>
preview
Gray-Scale Minimal

Ultra-minimal breadcrumbs with a dot separator and color hierarchy. Links are medium gray, the current page is white and bold. This works well when the breadcrumb lives inside a card or panel.

gray-breadcrumbs
Live
untitled.html
HTML
1<div class="gray-bc-wrap">
2 <nav class="breadcrumbs gray-bc" aria-label="Breadcrumb">
3 <ol>
4 <li>
5 <a href="#">
6 Home
7 </a>
8 </li>
9 <li>
10 <a href="#">
11 Blog
12 </a>
13 </li>
14 <li>
15 <a href="#">
16 Engineering
17 </a>
18 </li>
19 <li aria-current="page">
20 Building Design Systems at Scale
21 </li>
22 </ol>
23 </nav>
24</div>
preview
Semantic HTML Structure

Breadcrumbs should use a <nav> element with aria-label="Breadcrumb", an ordered list, and aria-current="page" on the last item. This ensures screen readers announce the full path correctly and distinguish the breadcrumb from other navigation landmarks.

breadcrumb-structure.html
HTML
1<nav class="breadcrumbs" aria-label="Breadcrumb">
2 <ol>
3 <li>
4 <a href="/"><!-- home icon --> Home</a>
5 </li>
6 <li>
7 <a href="/products">Products</a>
8 </li>
9 <li>
10 <a href="/products/electronics">Electronics</a>
11 </li>
12 <li aria-current="page">
13 Wireless Headphones
14 </li>
15 </ol>
16</nav>
โ„น

info

Always wrap breadcrumbs in a <nav> element with aria-label="Breadcrumb" so screen readers distinguish it from other navigation. Use an ordered list (<ol>) to convey hierarchy, and mark the current page with aria-current="page".
โœ“

best practice

For pages with more than 4 levels, collapse middle items behind an ellipsis or use dropdown menus. Showing every level in a flat list becomes overwhelming on mobile viewports and hinders quick scanning. Keep the root link (usually Home) visible even when collapsing.
โš 

warning

Avoid using breadcrumbs as the primary navigation. They are a supplementary pattern โ€” users should still be able to reach any page from the main navigation. Breadcrumbs shine in deep hierarchies like e-commerce categories, documentation sites, and file systems.
Accessibility

Accessible breadcrumbs reduce cognitive load for screen-reader users and keyboard navigators. Keep the markup semantic, the focus order logical, and the current location unambiguous.

  • Use a <nav> landmark with aria-label="Breadcrumb" so users can jump to it quickly.
  • Mark the current page with aria-current="page" and make it visually distinct (bold or accent color).
  • Use an ordered list <ol> so the hierarchy is announced in the correct sequence.
  • Ensure every interactive segment is reachable by keyboard and shows a visible focus indicator.
  • Keep touch targets at least 44ร—44px on mobile for each breadcrumb link or button.
  • Do not remove the underline or color from links if users rely on those cues to identify actionable text.
  • When using dropdowns, expose the toggle with aria-expanded and aria-haspopup in production implementations.
Best Practices
  • Use aria-label="Breadcrumb" on the nav element to distinguish it from primary navigation.
  • Mark the current page with aria-current="page" and make it visually distinct (bold, different color).
  • Keep the root link visible even when collapsing middle items with ellipsis.
  • Use semantic <ol> instead of <div> to convey ordering information.
  • Ensure touch targets are at least 44ร—44px on mobile for each breadcrumb link.
  • Truncate long labels with ellipsis rather than letting them overflow the container.
  • Sync breadcrumb links with the URL structure so deep links work correctly.
  • Provide Tailwind and Bootstrap variants from the same semantic base so teams can adopt the pattern without rewriting markup.

Community

Get help on Slack, Discord or VIP

Stuck on a guide? Join the community and ask.