Skip to content
v0.9.1
Layout

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

ClassDoes
.navbar-dropdown-menu.is-megaThe menu spans the navbar's whole width, right under it. Put a .container inside to line it up with the page.
.mega-gridColumns side by side, all the same width
.mega-col / .mega-titleA column of links / its small heading
.mega-featureA 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-footA row at the bottom for a note and a "see all" link. Hidden in the phone panel.
.mega-cards / .mega-cardA grid of link cards (3 across; --mega-cards changes it), lifting on hover
.mega-card-iconA small icon tile on a card; color it with a background class like .bg-violet-soft
.mega-card-mediaA picture on top of a card (16:9): a colored block with a big icon, or an <img>
.mega-span-2 / .mega-span-3Let one part of .mega-grid take 2 or 3 columns
.is-floatThe menu floats as a rounded card under the navbar instead of going edge to edge (automatic under .navbar-float)

Accessibility

Start

OverviewStart Getting startedStart CustomizeStart

Guides

AccessibilityGuides BreakpointsGuides ChangelogGuides Customize componentsGuides JavaScriptGuides MotionGuides OptimizeGuides PhonesGuides RebootGuides Right-to-left (RTL)Guides Stacking orderGuides Using Momo with AIGuides

Foundations

ColorsFoundations TypographyFoundations ProseFoundations Images & figuresFoundations CodeFoundations Lines & shadowsFoundations Dark modeFoundations

Forms

Checkbox & switchForms ComboboxForms Date pickerForms Date rangeForms Fields & labelsForms File uploadForms Floating labelsForms Number stepperForms PasswordForms PIN codeForms RatingForms SelectForms SliderForms Tag inputForms Time pickerForms ValidationForms

Components

AccordionComponents Alert & bannerComponents AvatarComponents BadgeComponents BreadcrumbComponents ButtonComponents Button groupComponents CalendarComponents CardComponents CarouselComponents ChartsComponents ChipsComponents CollapseComponents Command paletteComponents CommentsComponents Confirm dialogsComponents Cookie bannerComponents Data tableComponents Description listComponents Dialog & toastComponents DividerComponents DrawerComponents Dropdown menuComponents Empty stateComponents File managerComponents Filter & sortComponents Gallery & lightboxComponents Inbox & chatComponents Infinite scrollComponents KanbanComponents Keyboard shortcutsComponents List groupComponents MarqueeComponents Media objectComponents Nav overflowComponents Notification centerComponents PaginationComponents ProgressComponents Pull to refreshComponents SkeletonComponents SortableComponents SpinnerComponents Split viewComponents Stat cardComponents Steps & wizardComponents Swipe actionsComponents TableComponents TabsComponents TimelineComponents TogglerComponents Tooltip & popoverComponents TourComponents Tree viewComponents VideoComponents WhiteboardComponents

Layout

Announcement barLayout App shellLayout Back to topLayout Container & sectionLayout ExamplesLayout FooterLayout HeroLayout JumbotronLayout Mega menuLayout NavbarLayout Site sidebarLayout

Sections

Bento gridSections Blog cardsSections Call to actionSections Contact & newsletterSections FAQSections FeaturesSections Logo cloudSections PricingSections TeamSections TestimonialsSections

Utilities

OverviewUtilities State variantsUtilities Display & flexUtilities Grid & gapUtilities SpacingUtilities SizingUtilities TextUtilities Links & color strengthUtilities Position & overflowUtilities BackgroundsUtilities Borders & effectsUtilities Transforms & filtersUtilities InteractionsUtilities

Helpers

Fixed, sticky & frostedHelpers Hover & focusHelpers Hover revealHelpers Icon linkHelpers PrintHelpers Relative timeHelpers Screen reader textHelpers Scroll inHelpers ScrollspyHelpers Share buttonHelpers Skip linkHelpers StacksHelpers Stretched linkHelpers Theme toggleHelpers Truncated textHelpers

Page patterns

404 pagePage patterns Coming soonPage patterns Login & registerPage patterns SettingsPage patterns ProfilePage patterns CRM contactsPage patterns ProjectsPage patterns File manager pagePage patterns Billing & plansPage patterns Help centerPage patterns Mobile app screensPage patterns
↑ ↓ moveEnter openEsc close