22 CSS Breadcrumbs

Bordered Box

All crumbs share one bordered container with dividers. Active gets an inset top+bottom accent stroke.

Pure CSS MIT licensed

Bordered Box the 18th of 22 designs in the 22 CSS Breadcrumbs collection. The design is implemented in pure CSS — no JavaScript required. Copy the HTML and CSS panels below into your project. Because the demo is pure CSS, it works in any framework or templating engine you happen to use. The design honours prefers-reduced-motion and uses real semantic markup, so it ships accessibility-ready out of the box.

Live preview

Open in playground

The code

<nav class="bc-18" aria-label="Breadcrumb">
  <ol class="bc-18__list">
    <li class="bc-18__item"><a class="bc-18__link" href="javascript:void(0)">Home</a></li>
    <li class="bc-18__item"><a class="bc-18__link" href="javascript:void(0)">Docs</a></li>
    <li class="bc-18__item">
      <a class="bc-18__link bc-18__link--cur" aria-current="page" href="javascript:void(0)">API</a>
    </li>
  </ol>
</nav>
.bc-18__list {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.bc-18__item + .bc-18__item {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.bc-18__link {
  display: block;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition:
    background 0.25s,
    color 0.25s;
}

.bc-18__link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.bc-18__link--cur {
  background: rgba(139, 127, 255, 0.12);
  color: #8b7fff;
  pointer-events: none;
  box-shadow:
    inset 0 2px 0 #8b7fff,
    inset 0 -2px 0 #8b7fff;
}

Search CodeFronts

Loading…