Admin Layout

The basic structure of a CRM/ERP panel - a sidebar that turns into a Bottom Nav bar on mobile devices.

Layout and Bottom Nav

The .admin-layout class splits the screen into .admin-sidebar and .admin-main. On mobile devices, the sidebar automatically turns into a convenient navigation bar at the bottom of the screen (Bottom Nav).

Shrink your browser window to see the sidebar transform into a Bottom Nav!

<!-- Basic panel structure -->
<div class="admin-layout">

  <aside class="admin-sidebar">
    <!-- .admin-brand fits the logo (image, SVG, or text) to the sidebar's
         width. Add .admin-logo-compact so the logo automatically collapses
         into an icon badge in -sm/-md modes and on mobile -->
    <a href="#" class="admin-brand admin-logo-compact">Logo</a>

    <ul class="admin-nav">
      <li><a href="#" class="admin-nav-link is-active">Dashboard</a></li>
      <li><a href="#" class="admin-nav-link">Clients</a></li>
    </ul>
  </aside>

  <main class="admin-main">
    <!-- Main panel content -->
  </main>

</div>

Fading Content (Fade Bottom)

The .fade-bottom class adds a gradient at the bottom edge - scrolled content "fades out" instead of being sharply cut off. You can see the effect live on this page: both the sidebar and the main column have this class. It also works on any scrollable container (e.g. a list in a card); in that case set --fade-color to the container's background color (defaults to var(--bg-surface)) and optionally the height via --fade-height (defaults to 80px). On .admin-sidebar and .admin-main the color is picked automatically, and on mobile (Bottom Nav) the sidebar's gradient is automatically disabled.

Scroll this list - the last visible row fades out:

  • Item 1
  • Item 2
  • Item 3
  • Item 4
  • Item 5
  • Item 6
  • Item 7
  • Item 8
  • Item 9
  • Item 10
<!-- In an admin panel -->
<aside class="admin-sidebar fade-bottom">...</aside>
<main class="admin-main fade-bottom">...</main>

<!-- Any scrollable container -->
<div class="fade-bottom" style="max-height: 200px; overflow-y: auto; --fade-color: var(--bg-body);">
  ...long content...
</div>

Dashboard Header (Faux Cutout)

.dashboard-header creates the illusion of a cutout in the panel header - .dashboard-header-actions "protrudes" above the background, with a rounded, concave corner. A purely CSS effect (radial-gradient), no images.

Welcome, Anna

Here's a summary of your day.

<!-- Inside .admin-main -->
<div class="dashboard-header">
  <div>
    <h4>Welcome, Anna <svg class="icon" aria-hidden="true"><use href="img/icons-sprite.svg#ph-hand-waving"></use></svg></h4>
    <p>Here's a summary of your day.</p>
  </div>
  <div class="dashboard-header-actions">
    <button class="btn btn-secondary btn-sm">Export</button>
    <button class="btn btn-primary btn-sm">+ New project</button>
  </div>
</div>