Skip to content

Breadcrumb with Icons

Bootstrap 5 breadcrumbs with a home icon, icons per level and custom chevron, slash or dot dividers that collapse middle levels on mobile.

Also known as: breadcrumb navigation, breadcrumb trail with icons, page path navigation, custom breadcrumb divider

Breadcrumb with Icons live demo

Open in new tab

Bootstrap 5 code (HTML, CSS, JS)

Three Bootstrap 5 breadcrumb styles with a home icon, an icon for every level and a custom divider: an SVG chevron, a slash on a dark bar and a dot on an outlined pill. Use them above page titles in documentation, online stores and account areas.

How it works

Each breadcrumb is a nav.bci-crumbs around Bootstrap's ol.breadcrumb. Every breadcrumb-item is a flex row, and links and the active item use inline-flex with a small gap so the Bootstrap Icons line up with the text. The first item in the chevron style shows only a house icon, with a visually-hidden "Home" label for screen readers.

The dividers come from Bootstrap's own ::before pseudo-element. The .bci-crumbs--slash and .bci-crumbs--dot modifiers set --bs-breadcrumb-divider to "/" and a bullet. The .bci-crumbs--chevron modifier replaces the text with an empty box painted in --bci-divider-color and shaped by an inline SVG mask, so the chevron can be recolored with one variable.

On screens narrower than 576px the middle levels marked .bci-mid are hidden and a .bci-more item with a three-dot .bci-more-btn takes their place. The script listens for a click on that button, adds .bci-crumbs--expanded to the breadcrumb, which shows the hidden levels again, sets aria-expanded="true" and moves focus to the first revealed link. On wider screens the full trail is always shown and the button stays hidden.

Customization

  • --bci-divider-color on .bci-crumbs in style.css: changes the color of the chevron, slash or dot.
  • --bci-divider-size: makes the SVG chevron larger or smaller.
  • --bci-bg, --bci-link and --bci-text: set the background, link color and current-page color for each style.
  • --bci-radius: switch between a pill (999px) and a rounded bar (0.75rem).
  • --bs-breadcrumb-divider in .bci-crumbs--dot .breadcrumb: use any character, for example "\203A" for a single angle quote.
  • Remove .bci-mid from an item to keep it visible on small screens, or add it to more items to collapse them.
  • Swap the bi-* classes on the i elements to use other Bootstrap Icons per level.

Use cases

  • Documentation sites: a breadcrumb trail above the page title shows readers where they are
  • Online stores: category levels get their own icon, with a home icon as the starting point
  • Account areas: choose a chevron, slash or dot divider to match the surrounding design
  • Mobile layouts: middle levels collapse behind a three-dot button on small screens and expand on tap

Accessibility

Every trail is a nav with aria-label="Breadcrumb" and an ordered list, and the current page carries aria-current="page". Icons are aria-hidden, and the icon-only home link has a visually-hidden text. Dividers are generated by CSS, so they are not read aloud. The expand button has aria-expanded and an aria-label such as "Show 2 hidden levels". Links and the button get an outline on :focus-visible, and hover transitions are turned off under prefers-reduced-motion.

Usage notes

Requires Bootstrap 5 (added automatically) and Bootstrap Icons. Pick one style for your page and delete the other two nav blocks and their .bci-label captions. Without JavaScript the collapsed levels stay hidden on phones, so keep the script if you use .bci-mid.

Breadcrumb with Icons at a glance

Framework
Bootstrap 5
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
Bootstrap 5, Bootstrap Icons
Layout
Responsive, works on mobile
Category
Breadcrumbs
License
Free for personal and commercial use

Questions about this template

Can I use the Breadcrumb with Icons code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Bootstrap 5 and Bootstrap Icons from a CDN (the links are under Requirements). Paste the HTML where the component should appear, add the CSS to your stylesheet and load the JavaScript before the closing </body> tag. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. The script is plain vanilla JavaScript, so it works without jQuery, React or Vue. You can still use the markup inside those frameworks.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
  • <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
Breadcrumb with Icons – free Bootstrap 5 breadcrumb template
Breadcrumb with Icons · free Bootstrap 5 breadcrumb template

More Breadcrumbs

Arrow Breadcrumbs – free Pure CSS breadcrumb template

Arrow Breadcrumbs

Chevron-shaped breadcrumb steps cut with CSS clip-path, with an interlocking layout, a color ramp toward the current page and a compact dark variant. No JavaScript.

Breadcrumb with Schema.org Structured Data – free Bootstrap 5 breadcrumb template

Breadcrumb with Schema.org Structured Data

SEO-friendly Bootstrap 5 breadcrumb with BreadcrumbList microdata, a collapsible mobile path, a search result preview and a JSON-LD copy panel.