Snippets Navigation

Bootstrap 5 Navigation Sidebar with Icons and Badges

A compact help-centre sidebar with a primary call to action, icon links and count badges for articles and videos.

Bootstrap 5 No jQuery Aug 2020 2.8K views

<section class="wdw-stage">
  <div class="container" style="max-width:960px">
    <div class="row g-4 align-items-start">
      <div class="col-lg-4">
        <aside class="wdw-card p-3" aria-label="Help navigation">
          <div class="d-flex align-items-center gap-2 px-2 py-2 mb-3">
            <span class="wdw-icon" style="width:2.5rem;height:2.5rem"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><path d="M9.1 9a3 3 0 0 1 5.8 1c0 2-3 3-3 3M12 17h.01"/></svg></span>
            <div><div class="fw-bold lh-sm">Support hub</div><div class="small wdw-muted">Help & resources</div></div>
          </div>
          <button type="button" class="btn btn-primary rounded-pill w-100 mb-3 d-inline-flex align-items-center justify-content-center gap-2"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg>Ask a question</button>
          <nav class="nav nav-pills flex-column gap-1" id="sbNav" aria-label="Help sections">
        <a class="nav-link d-flex align-items-center gap-3" href="#" data-title="Help center"><span class="flex-shrink-0"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4M12 8h.01"/></svg></span><span class="flex-grow-1">Help center</span></a>
        <a class="nav-link d-flex align-items-center gap-3" href="#" data-title="Knowledgebase"><span class="flex-shrink-0"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20V2H6.5A2.5 2.5 0 0 0 4 4.5z"/></svg></span><span class="flex-grow-1">Knowledgebase</span></a>
        <a class="nav-link d-flex align-items-center gap-3" href="#" data-title="Articles"><span class="flex-shrink-0"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><path d="M14 2v6h6M8 13h8M8 17h8"/></svg></span><span class="flex-grow-1">Articles</span><span class="badge rounded-pill bg-primary-subtle text-primary-emphasis">402</span></a>
        <a class="nav-link d-flex align-items-center gap-3" href="#" data-title="Tutorials"><span class="flex-shrink-0"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m22 10-10-5L2 10l10 5z"/><path d="M6 12v5c3 2 9 2 12 0v-5"/></svg></span><span class="flex-grow-1">Tutorials</span></a>
        <a class="nav-link d-flex align-items-center gap-3" href="#" data-title="Video tutorials"><span class="flex-shrink-0"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="4" width="20" height="16" rx="3"/><path d="m10 9 5 3-5 3z"/></svg></span><span class="flex-grow-1">Video tutorials</span><span class="badge rounded-pill bg-primary-subtle text-primary-emphasis">90</span></a>
        <a class="nav-link d-flex align-items-center gap-3" href="#" data-title="Ask our community"><span class="flex-shrink-0"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.9M16 3.1a4 4 0 0 1 0 7.8"/></svg></span><span class="flex-grow-1">Ask our community</span></a>
        <a class="nav-link d-flex align-items-center gap-3" href="#" data-title="Contact us"><span class="flex-shrink-0"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="4" width="20" height="16" rx="2"/><path d="m22 7-10 6L2 7"/></svg></span><span class="flex-grow-1">Contact us</span></a>
          </nav>
        </aside>
      </div>
      <div class="col-lg-8">
        <section class="wdw-card p-4 p-lg-5" aria-labelledby="sbTitle" aria-live="polite">
          <span class="wdw-eyebrow">Browse</span>
          <h2 class="wdw-heading h3 mt-2 mb-2" id="sbTitle">Help center</h2>
          <p class="wdw-muted mb-4">Answers to the questions we hear most. Can't find yours? Ask the community or contact us.</p>
          <label class="visually-hidden" for="sbSearch">Search help articles</label>
          <input type="search" class="form-control rounded-pill mb-4" id="sbSearch" placeholder="Search help articles">
          <div class="small fw-bold text-body-emphasis mb-1">Popular articles</div>
          <div class="list-group list-group-flush"><a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center gap-3 py-3 px-0 bg-transparent" href="#"><span class="fw-semibold">Getting started with your account</span><span class="small wdw-muted text-nowrap">5 min read</span></a><a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center gap-3 py-3 px-0 bg-transparent" href="#"><span class="fw-semibold">Resetting your password and two-factor login</span><span class="small wdw-muted text-nowrap">3 min read</span></a><a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center gap-3 py-3 px-0 bg-transparent" href="#"><span class="fw-semibold">Managing billing, invoices and receipts</span><span class="small wdw-muted text-nowrap">6 min read</span></a><a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center gap-3 py-3 px-0 bg-transparent" href="#"><span class="fw-semibold">Connecting your domain step by step</span><span class="small wdw-muted text-nowrap">8 min read</span></a><a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center gap-3 py-3 px-0 bg-transparent" href="#"><span class="fw-semibold">Exporting your data</span><span class="small wdw-muted text-nowrap">4 min read</span></a></div>
        </section>
      </div>
    </div>
  </div>
</section>

Built on Bootstrap 5.3.8 with plain JavaScript — no jQuery. Supports light and dark mode via data-bs-theme.

Free to use in personal and commercial projects under the MIT license.