feega

free UI sections and components / sections

navbar, mega menu

By Andrea Buttarelli, founder of Feega · Free · Svelte, React, Vue, Astro, HTML

A product link that opens a wide panel of grouped links with icons; no JavaScript.

navigationheadermenu

code

NavbarMega.svelte
<header class="fl-navbar-mega">
  <div class="fl-container bar">
    <a class="brand" href="#" aria-label="Yourbrand home"><svg class="fl-px" viewBox="0 0 5 5" aria-hidden="true"><path d="M2 0h1v1h-1zM1 1h1v1h-1zM2 1h1v1h-1zM3 1h1v1h-1zM0 2h1v1h-1zM1 2h1v1h-1zM2 2h1v1h-1zM3 2h1v1h-1zM4 2h1v1h-1zM1 3h1v1h-1zM2 3h1v1h-1zM3 3h1v1h-1zM2 4h1v1h-1z" /></svg><span>yourbrand</span></a>
    <nav aria-label="Primary">
      <details class="mega">
        <summary>product <svg class="fl-px" viewBox="0 0 5 3" aria-hidden="true"><path d="M0 0h1v1h-1zM4 0h1v1h-1zM1 1h1v1h-1zM3 1h1v1h-1zM2 2h1v1h-1z" /></svg></summary>
        <div class="panel">
          <ul class="tiles">
            <li><a href="#"><span class="ic"><svg class="fl-px" viewBox="0 0 6 7" aria-hidden="true"><path d="M4 0h1v1h-1zM5 0h1v1h-1zM3 1h1v1h-1zM4 1h1v1h-1zM2 2h1v1h-1zM3 2h1v1h-1zM1 3h1v1h-1zM2 3h1v1h-1zM3 3h1v1h-1zM4 3h1v1h-1zM5 3h1v1h-1zM3 4h1v1h-1zM4 4h1v1h-1zM2 5h1v1h-1zM3 5h1v1h-1zM1 6h1v1h-1zM2 6h1v1h-1z" /></svg></span><b>editor</b><small>Change the page where it runs.</small></a></li>
            <li><a href="#"><span class="ic"><svg class="fl-px" viewBox="0 0 12 7" aria-hidden="true"><path d="M3 0h1v1h-1zM8 0h1v1h-1zM2 1h1v1h-1zM3 1h1v1h-1zM7 1h1v1h-1zM8 1h1v1h-1zM1 2h1v1h-1zM2 2h1v1h-1zM6 2h1v1h-1zM7 2h1v1h-1zM10 2h1v1h-1zM11 2h1v1h-1zM0 3h1v1h-1zM1 3h1v1h-1zM5 3h1v1h-1zM6 3h1v1h-1zM11 3h1v1h-1zM1 4h1v1h-1zM2 4h1v1h-1zM4 4h1v1h-1zM5 4h1v1h-1zM9 4h1v1h-1zM10 4h1v1h-1zM2 5h1v1h-1zM3 5h1v1h-1zM4 5h1v1h-1zM8 5h1v1h-1zM9 5h1v1h-1zM3 6h1v1h-1zM8 6h1v1h-1z" /></svg></span><b>components</b><small>Reuse what your team already built.</small></a></li>
            <li><a href="#"><span class="ic"><svg class="fl-px" viewBox="0 0 8 6" aria-hidden="true"><path d="M6 0h1v1h-1zM7 0h1v1h-1zM6 1h1v1h-1zM7 1h1v1h-1zM3 2h1v1h-1zM4 2h1v1h-1zM6 2h1v1h-1zM7 2h1v1h-1zM3 3h1v1h-1zM4 3h1v1h-1zM6 3h1v1h-1zM7 3h1v1h-1zM0 4h1v1h-1zM1 4h1v1h-1zM3 4h1v1h-1zM4 4h1v1h-1zM6 4h1v1h-1zM7 4h1v1h-1zM0 5h1v1h-1zM1 5h1v1h-1zM3 5h1v1h-1zM4 5h1v1h-1zM6 5h1v1h-1zM7 5h1v1h-1z" /></svg></span><b>insights</b><small>See what each change moved.</small></a></li>
            <li><a href="#"><span class="ic"><svg class="fl-px" viewBox="0 0 6 7" aria-hidden="true"><path d="M1 0h1v1h-1zM4 0h1v1h-1zM1 1h1v1h-1zM4 1h1v1h-1zM0 2h1v1h-1zM1 2h1v1h-1zM2 2h1v1h-1zM3 2h1v1h-1zM4 2h1v1h-1zM5 2h1v1h-1zM0 3h1v1h-1zM1 3h1v1h-1zM2 3h1v1h-1zM3 3h1v1h-1zM4 3h1v1h-1zM5 3h1v1h-1zM1 4h1v1h-1zM2 4h1v1h-1zM3 4h1v1h-1zM4 4h1v1h-1zM2 5h1v1h-1zM3 5h1v1h-1zM2 6h1v1h-1zM3 6h1v1h-1z" /></svg></span><b>integrations</b><small>Connect the tools you use.</small></a></li>
          </ul>
          <a class="feature" href="#">
            <span class="fl-eyebrow">new</span>
            <b>version 2.0 is out</b>
            <small>Read what changed <svg class="fl-px" viewBox="0 0 7 5" aria-hidden="true"><path d="M4 0h1v1h-1zM5 1h1v1h-1zM0 2h1v1h-1zM1 2h1v1h-1zM2 2h1v1h-1zM3 2h1v1h-1zM4 2h1v1h-1zM5 2h1v1h-1zM6 2h1v1h-1zM5 3h1v1h-1zM4 4h1v1h-1z" /></svg></small>
          </a>
        </div>
      </details>
      <ul class="links">
        <li><a href="#">pricing</a></li>
        <li><a href="#">docs</a></li>
        <li><a href="#">blog</a></li>
      </ul>
    </nav>
    <div class="actions">
      <a class="fl-btn fl-btn--primary fl-btn--sm" href="#">get started</a>
    </div>
  </div>
</header>

<style>
.fl-navbar-mega{font-family:var(--feega-font);font-size:var(--feega-text-body);line-height:1.5;letter-spacing:var(--feega-tracking);color:var(--feega-fg);background:var(--feega-bg);-webkit-font-smoothing:antialiased}
:where(.fl-navbar-mega) *,:where(.fl-navbar-mega) *::before,:where(.fl-navbar-mega) *::after{box-sizing:border-box}
:where(.fl-navbar-mega) :is(h1,h2,h3,h4,p,ul,ol,figure,blockquote,dl,dd){margin:0}
:where(.fl-navbar-mega) a{color:inherit;text-decoration:none}
:where(.fl-navbar-mega) :focus-visible{outline:2px solid var(--feega-focus);outline-offset:3px}
.fl-container{width:min(var(--feega-max-width),100% - 2 * var(--feega-gutter));margin-inline:auto}
.fl-px{display:block;flex:none;width:1em;height:auto;fill:currentColor;shape-rendering:crispEdges}
.fl-btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--feega-space-2);min-height:44px;padding:0 var(--feega-space-6);border:1px solid var(--feega-line-strong);border-radius:var(--feega-radius-full);background:transparent;color:var(--feega-fg);font:inherit;font-size:0.9375rem;font-weight:500;letter-spacing:var(--feega-tracking);white-space:nowrap;text-decoration:none;cursor:pointer;transition:background-color var(--feega-dur-fast) var(--feega-ease),border-color var(--feega-dur-fast) var(--feega-ease),color var(--feega-dur-fast) var(--feega-ease),transform var(--feega-dur-fast) var(--feega-ease)}
.fl-btn:hover{border-color:var(--feega-fg-subtle);background:var(--feega-surface)}
.fl-btn:active{transform:scale(0.97)}
.fl-btn--primary{border-color:var(--feega-accent);background:var(--feega-accent);color:var(--feega-accent-fg)}
.fl-btn--primary:hover{border-color:var(--feega-accent-hover);background:var(--feega-accent-hover)}
.fl-btn--ink{border-color:var(--feega-fg);background:var(--feega-fg);color:var(--feega-bg)}
.fl-btn--ink:hover{border-color:var(--feega-fg-muted);background:var(--feega-fg-muted)}
.fl-btn--ghost{border-color:transparent}
.fl-btn--sm{min-height:36px;padding:0 var(--feega-space-4);font-size:var(--feega-text-sm)}
.fl-btn .fl-px{width:10px;transition:transform var(--feega-dur) var(--feega-ease)}
.fl-btn:hover .fl-px{transform:translateX(3px)}
.fl-btn[disabled]{opacity:0.45;cursor:not-allowed}
.fl-navbar-mega{position:relative;z-index:2}
.fl-navbar-mega .bar{display:flex;align-items:center;gap:var(--feega-space-6);min-height:72px}
.brand{display:inline-flex;align-items:center;gap:10px;font-size:1.125rem;font-weight:600;letter-spacing:-0.04em}
.brand .fl-px{width:16px;color:var(--feega-accent)}
.fl-navbar-mega nav{flex:1;display:flex;flex-wrap:wrap;align-items:center;gap:var(--feega-space-1);min-width:0}
.fl-navbar-mega .links{display:flex;gap:var(--feega-space-1);margin:0;padding:0;list-style:none}
.fl-navbar-mega .links a{display:inline-flex;align-items:center;min-height:36px;padding:0 14px;border-radius:var(--feega-radius-full);color:var(--feega-fg-muted);font-weight:500;transition:background-color var(--feega-dur-fast) var(--feega-ease),color var(--feega-dur-fast) var(--feega-ease)}
.fl-navbar-mega .links a:hover{background:var(--feega-surface);color:var(--feega-fg)}
.fl-navbar-mega summary{display:inline-flex;align-items:center;gap:8px;min-height:36px;padding:0 14px;border-radius:var(--feega-radius-full);color:var(--feega-fg-muted);font-weight:500;list-style:none;cursor:pointer;transition:background-color var(--feega-dur-fast) var(--feega-ease),color var(--feega-dur-fast) var(--feega-ease)}
.fl-navbar-mega summary::-webkit-details-marker{display:none}
.fl-navbar-mega summary:hover,.fl-navbar-mega details[open] summary{background:var(--feega-surface);color:var(--feega-fg)}
.fl-navbar-mega summary .fl-px{width:8px;transition:transform var(--feega-dur) var(--feega-ease)}
.fl-navbar-mega details[open] summary .fl-px{transform:rotate(180deg)}
.fl-navbar-mega .panel{position:absolute;top:calc(100% - 4px);left:50%;z-index:10;display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:var(--feega-space-2);width:min(var(--feega-max-width),100% - 2 * var(--feega-gutter));padding:var(--feega-space-2);border-radius:var(--feega-radius-lg);background:var(--feega-raised);box-shadow:var(--feega-shadow-float);transform:translateX(-50%);animation:fl-navbar-mega-in var(--feega-dur) var(--feega-ease)}
@keyframes fl-navbar-mega-in{from{opacity:0;translate:0 -8px}}
.fl-navbar-mega .tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px;margin:0;padding:0;list-style:none}
.fl-navbar-mega .tiles a{display:grid;grid-template-columns:auto minmax(0,1fr);gap:2px 14px;padding:14px;border-radius:var(--feega-radius-md);transition:background-color var(--feega-dur-fast) var(--feega-ease)}
.fl-navbar-mega .tiles a:hover{background:var(--feega-surface)}
.fl-navbar-mega .ic{grid-row:span 2;display:grid;place-items:center;width:36px;height:36px;border-radius:var(--feega-radius-sm);background:var(--feega-accent-soft);color:var(--feega-accent-text)}
.fl-navbar-mega .ic .fl-px{width:14px}
.fl-navbar-mega .tiles b,.fl-navbar-mega .feature b{font-weight:500}
.fl-navbar-mega .tiles small{color:var(--feega-fg-muted);font-size:var(--feega-text-sm)}
.fl-navbar-mega .feature{display:flex;flex-direction:column;justify-content:flex-end;gap:6px;min-height:9rem;padding:var(--feega-space-6);border-radius:var(--feega-radius-md);background:var(--feega-surface)}
.fl-navbar-mega .feature b{font-size:var(--feega-text-xl);letter-spacing:-0.04em;line-height:1}
.fl-navbar-mega .feature small{display:inline-flex;align-items:center;gap:8px;color:var(--feega-fg-muted);font-size:var(--feega-text-sm)}
.fl-navbar-mega .feature small .fl-px{width:9px}
@media (max-width:760px){.fl-navbar-mega .bar{flex-wrap:wrap;gap:var(--feega-space-2) var(--feega-space-4);padding-block:var(--feega-space-3)}.fl-navbar-mega nav{order:3;flex-basis:100%;margin-inline:-14px}.fl-navbar-mega .actions{margin-left:auto}.fl-navbar-mega .links a,.fl-navbar-mega summary{padding:0 10px}.fl-navbar-mega .panel,.fl-navbar-mega .tiles{grid-template-columns:minmax(0,1fr)}.fl-navbar-mega .feature{min-height:0}}
@media (prefers-reduced-motion:reduce){:where([class^="fl-"]) *,:where([class^="fl-"]) *::before,:where([class^="fl-"]) *::after{animation:none!important;transition:none!important}}
</style>
tokens.css, the shared file every template reads
tokens.cssopen file
:root,
[data-theme="light"] {
  color-scheme: light;
  --feega-bg: #f7f6f2;
  --feega-surface: #efede7;
  --feega-raised: #ffffff;
  --feega-input: #ffffff;
  --feega-fg: #121212;
  --feega-fg-muted: #5c5a55;
  --feega-fg-subtle: #6d6a63;
  --feega-line: #e2dfd7;
  --feega-line-strong: #cdc9bf;
  --feega-dot: #d3cfc5;
  --feega-accent: #ff4f00;
  --feega-accent-hover: #ff6a26;
  --feega-accent-fg: #121212;
  --feega-accent-soft: #ffe8dc;
  --feega-accent-text: #b83800;
  --feega-danger: #c0231a;
  --feega-danger-fg: #ffffff;
  --feega-danger-soft: #fde6e3;
  --feega-success: #12703a;
  --feega-success-soft: #e0f3e6;
  --feega-focus: #ff4f00;
  --feega-overlay: rgb(18 18 18 / 0.4);
  --feega-shadow: 0 1px 2px rgb(18 18 18 / 0.05), 0 8px 24px -8px rgb(18 18 18 / 0.12);
  --feega-shadow-float: 0 2px 4px rgb(18 18 18 / 0.06), 0 24px 48px -12px rgb(18 18 18 / 0.22);
  --feega-radius-xs: 2px;
  --feega-radius-sm: 6px;
  --feega-radius-md: 10px;
  --feega-radius-lg: 16px;
  --feega-radius-full: 999px;
  --feega-font: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --feega-font-display: var(--feega-font);
  --feega-font-mono: "Fragment Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --feega-tracking: -0.02em;
  --feega-tracking-tight: -0.05em;
  --feega-text-xs: 0.75rem;
  --feega-text-sm: 0.875rem;
  --feega-text-body: 1rem;
  --feega-text-lg: clamp(1.0625rem, 1.6vw, 1.25rem);
  --feega-text-xl: 1.5rem;
  --feega-text-title: clamp(2.5rem, 6vw, 4.5rem);
  --feega-text-display: clamp(3rem, 9.5vw, 7rem);
  --feega-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --feega-dur-fast: 160ms;
  --feega-dur: 420ms;
  --feega-space-1: 0.25rem;
  --feega-space-2: 0.5rem;
  --feega-space-3: 0.75rem;
  --feega-space-4: 1rem;
  --feega-space-6: 1.5rem;
  --feega-space-8: 2rem;
  --feega-space-12: 3rem;
  --feega-space-16: 4rem;
  --feega-space-section: clamp(4.5rem, 11vw, 9rem);
  --feega-gutter: clamp(1rem, 4vw, 2rem);
  --feega-max-width: 76rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --feega-bg: #050505;
    --feega-surface: #121212;
    --feega-raised: #1a1a1a;
    --feega-input: #0d0d0d;
    --feega-fg: #f0eee9;
    --feega-fg-muted: #a3a09a;
    --feega-fg-subtle: #8a877f;
    --feega-line: #232323;
    --feega-line-strong: #363636;
    --feega-dot: #2c2c2c;
    --feega-accent: #ff5a14;
    --feega-accent-hover: #ff7333;
    --feega-accent-fg: #121212;
    --feega-accent-soft: #2b1206;
    --feega-accent-text: #ff7a3d;
    --feega-danger: #ff6b5e;
    --feega-danger-fg: #121212;
    --feega-danger-soft: #2e0f0c;
    --feega-success: #4cc47a;
    --feega-success-soft: #0d2617;
    --feega-focus: #ff5a14;
    --feega-overlay: rgb(0 0 0 / 0.7);
    --feega-shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 8px 24px -8px rgb(0 0 0 / 0.6);
    --feega-shadow-float: 0 2px 4px rgb(0 0 0 / 0.5), 0 24px 48px -12px rgb(0 0 0 / 0.8);
  }
}

[data-theme="dark"] {
  color-scheme: dark;
  --feega-bg: #050505;
  --feega-surface: #121212;
  --feega-raised: #1a1a1a;
  --feega-input: #0d0d0d;
  --feega-fg: #f0eee9;
  --feega-fg-muted: #a3a09a;
  --feega-fg-subtle: #8a877f;
  --feega-line: #232323;
  --feega-line-strong: #363636;
  --feega-dot: #2c2c2c;
  --feega-accent: #ff5a14;
  --feega-accent-hover: #ff7333;
  --feega-accent-fg: #121212;
  --feega-accent-soft: #2b1206;
  --feega-accent-text: #ff7a3d;
  --feega-danger: #ff6b5e;
  --feega-danger-fg: #121212;
  --feega-danger-soft: #2e0f0c;
  --feega-success: #4cc47a;
  --feega-success-soft: #0d2617;
  --feega-focus: #ff5a14;
  --feega-overlay: rgb(0 0 0 / 0.7);
  --feega-shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 8px 24px -8px rgb(0 0 0 / 0.6);
  --feega-shadow-float: 0 2px 4px rgb(0 0 0 / 0.5), 0 24px 48px -12px rgb(0 0 0 / 0.8);
}

what it is

Navbar, mega menu is a free section. A product link that opens a wide panel of grouped links with icons; no JavaScript. It is tagged navigation, header and menu.

It is markup and CSS only, with no script in any version.

Size per version: Svelte 1 file, 82 lines; React 2 files, 86 lines; Vue 1 file, 84 lines; Astro 1 file, 85 lines; HTML 2 files, 80 lines.

tokens this template reads

TokenControlsUses
--feega-easethe animation curve12
--feega-dur-fastthe short animation duration9
--feega-fgmain text6
--feega-fg-mutedsecondary text6
--feega-surfacequiet panels and chips5
--feega-space-2spacing step 24
--feega-accentthe brand colour on primary actions3
--feega-durthe animation duration3
--feega-radius-fullfully round pills and buttons3
--feega-space-6spacing step 63
--feega-text-smsmall text size3
--feega-accent-hoverthe accent on hover2

To restyle it, set any of these custom properties on :root, or on an ancestor of the template to change it in one place only. For example, --feega-accent changes the brand colour in light and dark alike. Add the shared tokens.css once per project.

fonts

It uses Inter Tight (400, 500, 600) from Google Fonts. Without them the font tokens fall back to a system stack.

head
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600&display=swap" />

insert with Feega

Open Add, then Library, and click Insert or drag it into your running app. Feega writes the component, tokens and fonts for your framework. One undo. how it works

Free VS Code extension. No account, no AI.

get feega →

related templates