Snippets Admin

Bootstrap 5 Responsive Admin Layout with Sidebar and Tabs

An admin screen with an indigo sidebar, top bar and greeting header, plus switchable Knowledge, Activity and Friends tabs.

Bootstrap 5 No jQuery Jan 2020 2K views

<section class="wdw-stage">
  <div class="container" style="max-width:1100px">
    <div class="adm wdw-card overflow-hidden d-md-flex">
      <aside class="adm-side wdw-aurora d-flex flex-md-column p-3 gap-md-4 align-items-center align-items-md-stretch">
        <div class="d-flex align-items-center gap-3 px-md-2 py-md-2">
          <img class="rounded-circle" src="https://i.pravatar.cc/96?img=12" width="44" height="44" alt="Jesse Couch">
          <div class="d-none d-md-block lh-sm"><div class="fw-bold">Jesse Couch</div><small class="text-white-50">Product lead</small></div>
        </div>
        <nav class="nav flex-md-column gap-1 ms-auto ms-md-0" aria-label="Admin">
          <a class="nav-link adm-link active" href="#" aria-current="page" aria-label="Dashboard"><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="3" y="3" width="7" height="9" rx="1.5"/><rect x="14" y="3" width="7" height="5" rx="1.5"/><rect x="14" y="12" width="7" height="9" rx="1.5"/><rect x="3" y="16" width="7" height="5" rx="1.5"/></svg><span class="d-none d-md-inline">Dashboard</span></a>
          <a class="nav-link adm-link" href="#" aria-label="Tasks"><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="m9 11 3 3L22 4"/><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"/></svg><span class="d-none d-md-inline">Tasks</span></a>
          <a class="nav-link adm-link" href="#" aria-label="Contacts"><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="8" r="4"/><path d="M4 21a8 8 0 0 1 16 0"/></svg><span class="d-none d-md-inline">Contacts</span></a>
          <a class="nav-link adm-link" href="#" aria-label="Calendar"><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="3" y="4" width="18" height="18" rx="2"/><path d="M16 2v4M8 2v4M3 10h18"/></svg><span class="d-none d-md-inline">Calendar</span></a>
          <a class="nav-link adm-link" href="#" aria-label="FAQs"><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 class="d-none d-md-inline">FAQs</span></a>
        </nav>
      </aside>
      <div class="flex-grow-1 min-w-0 d-flex flex-column">
        <header class="d-flex align-items-center justify-content-between gap-3 px-4 py-3 border-bottom">
          <div class="d-flex align-items-center gap-2">
            <span class="wdw-icon" style="width:2.25rem;height:2.25rem"><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 4h16v16H4z"/><path d="M9 4v16"/></svg></span>
            <span class="fw-bold">Overview</span>
          </div>
          <div class="d-flex align-items-center gap-1">
            <button type="button" class="btn btn-sm bg-body-tertiary text-body rounded-pill position-relative border-0" aria-label="Inbox, 3 new"><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 12h-6l-2 3h-4l-2-3H2"/><path d="M5.5 5h13L22 12v6a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-6z"/></svg><span class="position-absolute top-0 end-0 translate-middle p-1 bg-warning rounded-circle" style="margin:6px 4px 0 0"></span></button>
            <button type="button" class="btn btn-sm bg-body-tertiary text-body rounded-pill border-0" aria-label="Search"><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="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></svg></button>
          </div>
        </header>
        <div class="px-4 pt-4">
          <p class="wdw-eyebrow mb-1">Workspace</p>
          <h1 class="h3 wdw-heading mb-4">Good morning, Jesse</h1>
          <ul class="nav nav-underline adm-tabs" role="tablist">
            <li class="nav-item" role="presentation"><button class="nav-link active" id="t-k" data-bs-toggle="tab" data-bs-target="#p-k" type="button" role="tab" aria-controls="p-k" aria-selected="true">Knowledge</button></li>
            <li class="nav-item" role="presentation"><button class="nav-link" id="t-a" data-bs-toggle="tab" data-bs-target="#p-a" type="button" role="tab" aria-controls="p-a" aria-selected="false">Activity</button></li>
            <li class="nav-item" role="presentation"><button class="nav-link" id="t-f" data-bs-toggle="tab" data-bs-target="#p-f" type="button" role="tab" aria-controls="p-f" aria-selected="false">Friends</button></li>
          </ul>
        </div>
        <div class="tab-content bg-body-tertiary p-4 adm-panes flex-grow-1">
          <div class="tab-pane fade show active" id="p-k" role="tabpanel" aria-labelledby="t-k" tabindex="0">
            <h2 class="h6 fw-bold">Launch checklist</h2>
            <p class="text-body-secondary">Everything the team needs before the spring release: design tokens, release notes and the support playbook. Pinned articles are updated every Friday.</p>
            <p class="text-body-secondary mb-0">Start with the onboarding guide, then jump to the API changelog for breaking changes.</p>
          </div>
          <div class="tab-pane fade" id="p-a" role="tabpanel" aria-labelledby="t-a" tabindex="0">
            <ul class="list-unstyled mb-0 d-grid gap-3">
              <li class="d-flex gap-3"><span class="wdw-icon rounded-circle">A</span><div><strong>Ana</strong> closed 4 tasks in <em>Billing</em><div class="small text-body-secondary">12 minutes ago</div></div></li>
              <li class="d-flex gap-3"><span class="wdw-icon rounded-circle">M</span><div><strong>Marcus</strong> commented on <em>Onboarding v2</em><div class="small text-body-secondary">1 hour ago</div></div></li>
            </ul>
          </div>
          <div class="tab-pane fade" id="p-f" role="tabpanel" aria-labelledby="t-f" tabindex="0">
            <div class="d-flex gap-3 flex-wrap">
              <div class="d-flex align-items-center gap-2"><img class="rounded-circle" src="https://i.pravatar.cc/80?img=32" width="40" height="40" alt="Ana Ruiz"><span class="fw-semibold">Ana Ruiz</span></div>
              <div class="d-flex align-items-center gap-2"><img class="rounded-circle" src="https://i.pravatar.cc/80?img=15" width="40" height="40" alt="Marcus Hale"><span class="fw-semibold">Marcus Hale</span></div>
              <div class="d-flex align-items-center gap-2"><img class="rounded-circle" src="https://i.pravatar.cc/80?img=47" width="40" height="40" alt="Priya Nair"><span class="fw-semibold">Priya Nair</span></div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</section>

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