Sectioned Mini Sidebar

This sidebar groups navigation items into labeled sections for clarity in small layouts.

HTML

<nav class="sidebar-sectioned">
  <div class="sidebar-sectioned__group">
    <span>General</span>
    <button>Overview</button>
  </div>
  <div class="sidebar-sectioned__group">
    <span>Account</span>
    <button>Billing</button>
  </div>
</nav>

CSS

.sidebar-sectioned {
  width: 200px;
  padding: 0.75rem;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  display: grid;
  gap: 0.75rem;
}

.sidebar-sectioned__group span {
  font-size: 11px;
  text-transform: uppercase;
  color: #6b7280;
}

.sidebar-sectioned__group button {
  margin-top: 0.25rem;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  border: none;
  background: #f3f4f6;
  font-size: 12px;
  text-align: left;
}

@media (prefers-color-scheme: dark) {
  .sidebar-sectioned {
    background: #1f2937;
    border-color: #374151;
    color: #e5e7eb;
  }

  .sidebar-sectioned__group button {
    background: #111827;
    color: #e5e7eb;
  }
}

Notes

  • Clear grouping in compact layouts
  • Scales well as sections grow
  • Suitable for settings and admin panels

Preview styles shown. Production customization recommended.

Browse More UI Components

Explore hundreds of reusable HTML & CSS UI components built for modern web projects.
Discover buttons, cards, loaders, animations, layouts, and more all with live previews and clean, copy-paste code.

Leave a Reply

Your email address will not be published. Required fields are marked *