Mega menu
A big dropdown for a site with lots of pages. It opens under the whole navbar with columns of links, a featured card and a row at the bottom. When the navbar folds on a phone, the same markup becomes a plain list inside the menu panel.
Mega menu
It is a navbar dropdown with .is-mega on its menu. Click Product or Resources.
<header class="navbar navbar-surface">
<div class="navbar-inner container">
<a class="navbar-brand" href="#"><span class="navbar-mark"><i class="mi mi-letter-m mi-stroke-2.5" aria-hidden="true"></i></span>Momo</a>
<button class="navbar-toggle" type="button" aria-label="Menu"><i class="mi mi-menu" aria-hidden="true"></i><i class="mi mi-x" aria-hidden="true"></i></button>
<div class="navbar-menu">
<div class="navbar-menu-head"><b>Menu</b><button class="btn btn-icon btn-sm btn-ghost" type="button" data-momo-close aria-label="Close menu"><i class="mi mi-x" aria-hidden="true"></i></button></div>
<nav class="navbar-nav" aria-label="Main">
<details class="navbar-dropdown">
<summary class="navbar-link">Product <i class="mi mi-chevron-down navbar-caret" aria-hidden="true"></i></summary>
<div class="navbar-dropdown-menu is-mega">
<div class="container">
<div class="mega-grid">
<div class="mega-col">
<p class="mega-title">Build</p>
<a href="#"><i class="mi mi-layout-dashboard" aria-hidden="true"></i><span><b>Dashboards</b><small>Stats, charts and tables</small></span></a>
<a href="#"><i class="mi mi-layout-kanban" aria-hidden="true"></i><span><b>Boards</b><small>Kanban with drag and drop</small></span></a>
<a href="#"><i class="mi mi-calendar" aria-hidden="true"></i><span><b>Calendar</b><small>Months, weeks and ranges</small></span></a>
</div>
<div class="mega-col">
<p class="mega-title">Talk</p>
<a href="#"><i class="mi mi-messages" aria-hidden="true"></i><span><b>Chat</b><small>Threads and mentions</small></span></a>
<a href="#"><i class="mi mi-message-circle" aria-hidden="true"></i><span><b>Comments</b><small>Replies and reactions</small></span></a>
<a href="#"><i class="mi mi-bell" aria-hidden="true"></i><span><b>Notifications</b><small>Toasts and badges</small></span></a>
</div>
<div class="mega-col">
<p class="mega-title">Websites</p>
<a href="#"><i class="mi mi-layout" aria-hidden="true"></i><span><b>Landing pages</b><small>Hero, sections, footer</small></span></a>
<a href="#"><i class="mi mi-palette" aria-hidden="true"></i><span><b>Themes</b><small>Colors, corners, shadows</small></span></a>
</div>
<a class="mega-feature" href="#">
<i class="mi mi-sparkles" aria-hidden="true"></i>
<b>New: file manager</b>
<small>Folders, previews and uploads in one component.</small>
</a>
</div>
<div class="mega-foot">
<span>Free and open source. No build step.</span>
<a href="#">See all components <i class="mi mi-arrow-right rtl-flip" aria-hidden="true"></i></a>
</div>
</div>
</div>
</details>
<details class="navbar-dropdown">
<summary class="navbar-link">Resources <i class="mi mi-chevron-down navbar-caret" aria-hidden="true"></i></summary>
<div class="navbar-dropdown-menu is-mega">
<div class="container">
<div class="mega-grid">
<div class="mega-col">
<p class="mega-title">Learn</p>
<a href="#"><i class="mi mi-book-open" aria-hidden="true"></i><span><b>Docs</b><small>Every class, with demos</small></span></a>
<a href="#"><i class="mi mi-school" aria-hidden="true"></i><span><b>Guides</b><small>Build a site step by step</small></span></a>
</div>
<div class="mega-col">
<p class="mega-title">Community</p>
<a href="#"><i class="mi mi-github" aria-hidden="true"></i><span><b>GitHub</b><small>Code, issues and ideas</small></span></a>
<a href="#"><i class="mi mi-discord" aria-hidden="true"></i><span><b>Discord</b><small>Ask and share</small></span></a>
</div>
<div class="mega-col">
<p class="mega-title">Company</p>
<a href="#"><i class="mi mi-info" aria-hidden="true"></i><span><b>About</b><small>Who makes Momo</small></span></a>
<a href="#"><i class="mi mi-newspaper" aria-hidden="true"></i><span><b>Blog</b><small>News and releases</small></span></a>
</div>
</div>
</div>
</div>
</details>
<a class="navbar-link" href="#">Pricing</a>
</nav>
<div class="navbar-actions">
<a class="btn btn-ghost" href="#">Sign in</a>
<a class="btn btn-brand" href="#">Get started</a>
</div>
</div>
</div>
</header>
<div class="docs-mega-space" aria-hidden="true"></div>Cards, on a floating navbar
Put links in a .mega-cards grid as .mega-cards: each is a small card with a colored icon tile that lifts on hover. Here the navbar itself floats (.navbar-float, see the navbar), so its mega menu floats with it at the same width. .mega-span-3 lets the cards take three columns next to a plain list.
<header class="navbar navbar-float">
<div class="navbar-inner">
<a class="navbar-brand" href="#"><span class="navbar-mark"><i class="mi mi-letter-m mi-stroke-2.5" aria-hidden="true"></i></span>Momo</a>
<button class="navbar-toggle" type="button" aria-label="Menu"><i class="mi mi-menu" aria-hidden="true"></i><i class="mi mi-x" aria-hidden="true"></i></button>
<div class="navbar-menu">
<div class="navbar-menu-head"><b>Menu</b><button class="btn btn-icon btn-sm btn-ghost" type="button" data-momo-close aria-label="Close menu"><i class="mi mi-x" aria-hidden="true"></i></button></div>
<nav class="navbar-nav" aria-label="Main (cards)">
<details class="navbar-dropdown">
<summary class="navbar-link">Product <i class="mi mi-chevron-down navbar-caret" aria-hidden="true"></i></summary>
<div class="navbar-dropdown-menu is-mega">
<div class="container">
<div class="mega-grid">
<div class="mega-cards mega-span-3">
<a class="mega-card" href="#"><span class="mega-card-icon bg-violet-soft"><i class="mi mi-layout-dashboard" aria-hidden="true"></i></span><span><b>Dashboards</b><small>Stats, charts and tables in one view</small></span></a>
<a class="mega-card" href="#"><span class="mega-card-icon bg-yellow-soft"><i class="mi mi-layout-kanban" aria-hidden="true"></i></span><span><b>Boards</b><small>Kanban with drag and drop</small></span></a>
<a class="mega-card" href="#"><span class="mega-card-icon bg-green-soft"><i class="mi mi-calendar" aria-hidden="true"></i></span><span><b>Calendar</b><small>Months, weeks and ranges</small></span></a>
<a class="mega-card" href="#"><span class="mega-card-icon bg-pink-soft"><i class="mi mi-messages" aria-hidden="true"></i></span><span><b>Chat</b><small>Threads, mentions, reactions</small></span></a>
<a class="mega-card" href="#"><span class="mega-card-icon bg-blue-soft"><i class="mi mi-folder" aria-hidden="true"></i></span><span><b>Files</b><small>Folders, previews, uploads</small></span></a>
<a class="mega-card" href="#"><span class="mega-card-icon bg-orange-soft"><i class="mi mi-chart-bar" aria-hidden="true"></i></span><span><b>Charts</b><small>Bars, lines and donuts</small></span></a>
</div>
<div class="mega-col">
<p class="mega-title">Get started</p>
<a href="#"><i class="mi mi-book-open" aria-hidden="true"></i><span><b>Docs</b><small>Every class, with demos</small></span></a>
<a href="#"><i class="mi mi-download" aria-hidden="true"></i><span><b>Install</b><small>One CSS file, one script</small></span></a>
<a href="#"><i class="mi mi-palette" aria-hidden="true"></i><span><b>Customize</b><small>Your colors and corners</small></span></a>
</div>
</div>
</div>
</div>
</details>
<a class="navbar-link" href="#">Pricing</a>
<a class="navbar-link" href="#">Blog</a>
</nav>
<div class="navbar-actions">
<a class="btn btn-brand" href="#">Get started</a>
</div>
</div>
</div>
</header>
<div class="docs-mega-space" aria-hidden="true"></div>Picture cards, floating menu
A .mega-card-media on top makes a picture card: a colored block with a big icon, or an <img>. Good for templates, posts or case studies. .is-float on the menu makes it float as a card under a normal navbar. On a phone, pictures are hidden and the cards become the usual list.
<header class="navbar">
<div class="navbar-inner container">
<a class="navbar-brand" href="#"><span class="navbar-mark"><i class="mi mi-letter-m mi-stroke-2.5" aria-hidden="true"></i></span>Momo</a>
<button class="navbar-toggle" type="button" aria-label="Menu"><i class="mi mi-menu" aria-hidden="true"></i><i class="mi mi-x" aria-hidden="true"></i></button>
<div class="navbar-menu">
<div class="navbar-menu-head"><b>Menu</b><button class="btn btn-icon btn-sm btn-ghost" type="button" data-momo-close aria-label="Close menu"><i class="mi mi-x" aria-hidden="true"></i></button></div>
<nav class="navbar-nav" aria-label="Main (pictures)">
<details class="navbar-dropdown">
<summary class="navbar-link">Templates <i class="mi mi-chevron-down navbar-caret" aria-hidden="true"></i></summary>
<div class="navbar-dropdown-menu is-mega is-float">
<div class="container">
<div class="mega-grid">
<div class="mega-col">
<p class="mega-title">By type</p>
<a href="#"><i class="mi mi-rocket" aria-hidden="true"></i><span><b>Landing pages</b></span></a>
<a href="#"><i class="mi mi-briefcase" aria-hidden="true"></i><span><b>Portfolios</b></span></a>
<a href="#"><i class="mi mi-shopping-bag" aria-hidden="true"></i><span><b>Shops</b></span></a>
<a href="#"><i class="mi mi-pencil" aria-hidden="true"></i><span><b>Blogs</b></span></a>
</div>
<div class="mega-cards mega-span-3">
<a class="mega-card" href="#"><span class="mega-card-media bg-yellow-soft"><i class="mi mi-rocket" aria-hidden="true"></i></span><span><b>Launch</b><small>A one-page site for a new app</small></span></a>
<a class="mega-card" href="#"><span class="mega-card-media bg-violet-soft"><i class="mi mi-camera" aria-hidden="true"></i></span><span><b>Studio</b><small>A portfolio with big pictures</small></span></a>
<a class="mega-card" href="#"><span class="mega-card-media bg-green-soft"><i class="mi mi-coffee" aria-hidden="true"></i></span><span><b>Corner Café</b><small>Menu, hours and a map</small></span></a>
</div>
</div>
<div class="mega-foot">
<span>24 templates, all free.</span>
<a href="#">Browse all templates <i class="mi mi-arrow-right rtl-flip" aria-hidden="true"></i></a>
</div>
</div>
</div>
</details>
<a class="navbar-link" href="#">Pricing</a>
<a class="navbar-link" href="#">Blog</a>
</nav>
<div class="navbar-actions">
<a class="btn btn-ghost" href="#">Sign in</a>
<a class="btn btn-brand" href="#">Get started</a>
</div>
</div>
</div>
</header>
<div class="docs-mega-space" aria-hidden="true"></div>How it is built
<details class="navbar-dropdown">
<summary class="navbar-link">Product <i class="mi mi-chevron-down navbar-caret"></i></summary>
<div class="navbar-dropdown-menu is-mega">
<div class="container">
<div class="mega-grid">
<div class="mega-col">
<p class="mega-title">Build</p>
<a href="…"><i class="mi mi-…"></i><span><b>Title</b><small>One line</small></span></a>
</div>
<a class="mega-feature" href="…">…</a> <!-- optional -->
</div>
<div class="mega-foot">…</div> <!-- optional -->
</div>
</div>
</details>
Classes
| Class | Does |
|---|---|
.navbar-dropdown-menu.is-mega | The menu spans the navbar's whole width, right under it. Put a .container inside to line it up with the page. |
.mega-grid | Columns side by side, all the same width |
.mega-col / .mega-title | A column of links / its small heading |
.mega-feature | A colored card for one thing to point out (soft yellow; change it with --mega-feature-bg). Hidden in the phone panel to keep it short. |
.mega-foot | A row at the bottom for a note and a "see all" link. Hidden in the phone panel. |
.mega-cards / .mega-card | A grid of link cards (3 across; --mega-cards changes it), lifting on hover |
.mega-card-icon | A small icon tile on a card; color it with a background class like .bg-violet-soft |
.mega-card-media | A picture on top of a card (16:9): a colored block with a big icon, or an <img> |
.mega-span-2 / .mega-span-3 | Let one part of .mega-grid take 2 or 3 columns |
.is-float | The menu floats as a rounded card under the navbar instead of going edge to edge (automatic under .navbar-float) |
Accessibility
- It opens on click or Enter, not on hover, so it works the same with a mouse, a keyboard and a finger.
- Esc, a click outside, or tabbing out closes it; opening one closes the other.
- Column headings are plain text, not links, so they don't add stops for keyboard users.