Skip to content

Sidenav M3

Sidenav M3 is a Metro UI 3 sidebar navigation component. It provides a stylish navigation menu with support for icons, dropdown menus, and colored indicators on the sides of menu items.

<ul class="sidenav-m3">
<li class="title">Navigation</li>
<li class="active">
<a href="#">
<span class="icon mif-home"></span>
Home
</a>
</li>
<li>
<a href="#">
<span class="icon mif-user"></span>
Profile
</a>
</li>
<li>
<a href="#">
<span class="icon mif-cog"></span>
Settings
</a>
</li>
</ul>
<ul class="sidenav-m3">
<li class="title">Navigation</li>
<li class="stick-left stick-color-red active">
<a href="#">
<span class="icon mif-home"></span>
Home
</a>
</li>
<li class="stick-left stick-color-blue">
<a href="#">
<span class="icon mif-user"></span>
Profile
</a>
</li>
<li class="stick-left stick-color-green">
<a href="#">
<span class="icon mif-cog"></span>
Settings
</a>
</li>
</ul>
<ul class="sidenav-m3">
<li class="title">Navigation</li>
<li>
<a href="#" class="dropdown-toggle">
<span class="icon mif-user"></span>
User
<span class="dropdown-caret"></span>
</a>
<ul class="d-menu" data-role="dropdown">
<li><a href="#">Profile</a></li>
<li><a href="#">Settings</a></li>
<li><a href="#">Logout</a></li>
</ul>
</li>
</ul>
VariableDefault (Light)Dark ModeDescription
--sidenav-m3-width220px220pxWidth of the sidenav
--sidenav-m3-border-radius4px4pxBorder radius of menu items and indicators
VariableDefault (Light)Dark ModeDescription
--sidenav-m3-background#f6f6f6#2b2d30Background color of the sidenav
--sidenav-m3-color#191919#dfe1e5Text color of menu items
--sidenav-m3-icon-color#191919#dfe1e5Color of menu item icons
--sidenav-m3-counter-color#191919#dfe1e5Color of counter text
--sidenav-m3-background-hover#cecece#43454aBackground color of menu items on hover
--sidenav-m3-color-hover#0a0a0a#ffffffText color of menu items on hover
--sidenav-m3-background-active#68a3ff#468cffBackground color of active menu items
--sidenav-m3-color-active#ffffff#ffffffText color of active menu items
.my-sidenav {
--sidenav-m3-width: 250px;
--sidenav-m3-background: #e0e0e0;
--sidenav-m3-background-active: #1ba1e2;
}
  • .sidenav-m3 - Main component class
  • .icon - Applied to the icon element
  • .title - Applied to the title element
  • .dropdown-caret - Applied to the dropdown caret element
  • .stick-left - Adds a colored indicator to the left side of the menu item
  • .stick-right - Adds a colored indicator to the right side of the menu item
  • .stick-color-[color] - Sets the color of the indicator, where [color] can be any of the standard Metro UI colors (red, green, blue, yellow, etc.)
  • .active - Applied to the active menu item
  • Use meaningful icons that clearly represent the menu item’s purpose
  • Use colored indicators (sticks) to categorize menu items or highlight important sections
  • Keep the menu structure simple and organized with clear hierarchy
  • Use the title class to create section headers within the menu
  • Use consistent colors for indicators to create a cohesive visual language
  • Consider using right-side indicators for items that represent outgoing actions