Welcome to Vanilla Breeze
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
Header navigation patterns with dropdowns, search, and mobile responsive menus.
Navigation bars are the primary way users navigate your site. These patterns use header.site for the base layout (flex, padding, border) and nav.horizontal with <ul>/<li> for horizontal link spacing with list semantics. VB's header.site nav automatically provides muted, compact link styling — no custom CSS needed for most navbars.
Key features:
aria-current="page"drop-down componentdata-sticky attributeA basic navigation bar with horizontal links. Uses header.site for layout and aria-current="page" to indicate the active page. Zero custom CSS required — all styling comes from VB's header.site and nav styles.
<header class="site"> <a href="/"><brand-mark>Acme Co</brand-mark></a> <nav class="horizontal" aria-label="Main navigation"> <ul> <li><a href="/products/">Products</a></li> <li><a href="/pricing/">Pricing</a></li> <li><a href="/about/" aria-current="page">About</a></li> <li><a href="/contact/">Contact</a></li> </ul> </nav></header>
Navigation with dropdown submenus using the drop-down component. Dropdowns are keyboard accessible and close on outside click or Escape. The no-flip attribute prevents menus from flipping upward in constrained viewports.
<header class="site"> <a href="/"><brand-mark>Acme Co</brand-mark></a> <nav class="horizontal" aria-label="Main navigation"> <ul> <li> <drop-down no-flip> <button data-trigger class="ghost">Products</button> <menu> <li><a href="/products/software/">Software</a></li> <li><a href="/products/hardware/">Hardware</a></li> <li><a href="/products/services/">Services</a></li> </menu> </drop-down> </li> <li><a href="/pricing/">Pricing</a></li> <li> <drop-down no-flip> <button data-trigger class="ghost">Resources</button> <menu> <li><a href="/docs/">Documentation</a></li> <li><a href="/blog/">Blog</a></li> <li><a href="/support/">Support</a></li> </menu> </drop-down> </li> <li><a href="/contact/">Contact</a></li> </ul> </nav></header>
Navigation bar with an integrated search field. The <search> element uses the .with-icon class for positioned <icon-wc> icons.
<header class="site"> <a href="/"><brand-mark>Acme Co</brand-mark></a> <nav class="horizontal" aria-label="Main navigation"> <ul> <li><a href="/products/">Products</a></li> <li><a href="/pricing/">Pricing</a></li> <li><a href="/about/">About</a></li> </ul> </nav> <search class="header with-icon rounded"> <icon-wc name="search" size="sm"></icon-wc> <input type="search" placeholder="Search..." aria-label="Search site" /> </search></header>
One small override to constrain the search input width in nav context:
/* Search input width override for nav context */header.site search input { min-inline-size: 180px; inline-size: auto;}
A responsive navbar that collapses to a hamburger menu on smaller screens. Uses the native <details>/<summary> pattern for the toggle — no JavaScript required. The CSS overrides VB's default details/summary styles (border, chevron, padding) to work as a clean mobile menu trigger.
<header class="site"> <a href="/"><brand-mark>Acme Co</brand-mark></a> <nav class="horizontal desktop-nav" aria-label="Main navigation"> <ul> <li><a href="/products/">Products</a></li> <li><a href="/pricing/">Pricing</a></li> <li><a href="/about/" aria-current="page">About</a></li> <li><a href="/contact/">Contact</a></li> </ul> </nav> <details class="mobile-menu"> <summary aria-label="Open menu"> <span class="hamburger"></span> </summary> <nav class="mobile-nav" aria-label="Main navigation"> <ul> <li><a href="/products/">Products</a></li> <li><a href="/pricing/">Pricing</a></li> <li><a href="/about/" aria-current="page">About</a></li> <li><a href="/contact/">Contact</a></li> </ul> </nav> </details></header>
The mobile menu requires CSS for VB details/summary overrides, the hamburger icon animation, and responsive behavior:
/* Override VB details/summary styles for mobile menu */.mobile-menu { border: none; border-radius: 0;} .mobile-menu summary { padding: var(--size-xs); min-block-size: auto; border: none;} .mobile-menu summary::after { content: none; /* Suppress VB chevron — hamburger replaces it */} .mobile-menu > .mobile-nav { padding-inline: 0; padding-block-end: 0;} /* Mobile menu toggle */.mobile-menu { display: none;} @media (max-width: 768px) { .desktop-nav { display: none; } .mobile-menu { display: block; position: relative; } /* Hamburger icon */ .hamburger { display: block; width: 24px; height: 2px; background: var(--color-text); position: relative; } .hamburger::before, .hamburger::after { content: ""; position: absolute; width: 24px; height: 2px; background: var(--color-text); left: 0; } .hamburger::before { top: -7px; } .hamburger::after { top: 7px; } /* Open state — X icon */ .mobile-menu[open] .hamburger { background: transparent; } .mobile-menu[open] .hamburger::before { top: 0; transform: rotate(45deg); } .mobile-menu[open] .hamburger::after { top: 0; transform: rotate(-45deg); } /* Mobile nav panel */ .mobile-nav { position: absolute; top: calc(100% + var(--size-s)); right: 0; background: var(--color-surface); border: var(--border-width-thin) solid var(--color-border); border-radius: var(--radius-m); padding: var(--size-s); min-width: 200px; box-shadow: var(--shadow-m); } .mobile-nav a { display: block; padding: var(--size-s) var(--size-m); border-radius: var(--radius-s); } .mobile-nav a:hover { background: var(--color-surface-raised); }}
A navigation bar that stays fixed at the top of the viewport as the user scrolls. Add data-sticky to the header for position, z-index, and background, then enhance with a backdrop blur.
<header data-sticky class="site"> <a href="/"><brand-mark>Acme Co</brand-mark></a> <nav class="horizontal" aria-label="Main navigation"> <ul> <li><a href="/products/">Products</a></li> <li><a href="/pricing/">Pricing</a></li> <li><a href="/about/">About</a></li> <li><a href="/contact/">Contact</a></li> <li><a href="/get-started/" class="button small">Get Started</a></li> </ul> </nav></header>
/* Backdrop blur enhancement for sticky header */header.site[data-sticky] { backdrop-filter: blur(8px); background: oklch(from var(--color-surface) l c h / 0.9);}
VB handles all base navbar styling automatically — no custom CSS needed for the simple, dropdown, or sticky variants:
/* No custom header/nav CSS needed! * header.site provides: flex layout, padding, border * header.site nav overrides: muted link color, compact padding * nav a handles: text-decoration, transitions, hover/active states * aria-current="page" gets: interactive color + medium weight */
header.site provides flex layout with justify-content: space-between — brand-mark left, nav right, automaticallyheader.site nav sets muted link color, compact padding, and hover transitions via CSS custom properties<ul>/<li> inside <nav> — screen readers announce "navigation, list, 4 items" which helps users understand the scopearia-label on <nav> to identify its purpose (e.g., "Main navigation")aria-current="page" on the link representing the current pagedrop-down component handles keyboard navigation and ARIA automatically. Use no-flip in constrained viewports<nav> with <ul>/<li> for a proper navigation landmark. Override VB's details/summary styles (border, summary::after chevron, padding) when using details as a mobile menu triggerdata-sticky to header.site for position/z-index/background, then add backdrop-filter for a polished effectNative navigation element documentation
Dropdown web component documentation
Vertical sidebar navigation patterns
Dropdown menu snippets and examples