Header & Navbar
The navbar is how visitors move between your sections and pages. This article covers Shock’s three navbar layouts, its sticky-scroll behaviors, and the mega menu, all built on Bootstrap 5.
Navbar layouts
Section titled “Navbar layouts”Each layout is a single <nav> element; each ships in light and dark demo versions.
<nav id="navbar" class="navbar navbar-expand-lg auto-hide scheme-1 primary">The standard horizontal navbar — logo on one side, links on the other.
<nav id="navbar" class="navbar navbar-extended navbar-expand-lg absolute scheme-1 primary">A taller navbar with room for extra content, positioned absolute over the hero.
<nav id="navbar" class="navbar navbar-centered navbar-expand-lg auto-hide scheme-1 primary">A symmetrical layout with the logo centered between two groups of links.
Sticky behavior
Section titled “Sticky behavior”How the navbar reacts as the visitor scrolls is controlled with a class:
Add auto-hide to hide the navbar when scrolling down and reveal it when scrolling up —
keeping content front and center while staying one scroll away.
<nav id="navbar" class="navbar navbar-expand-lg auto-hide scheme-1 primary">Wrap the navbar to keep it always visible, pinned as the page scrolls.
<div id="navbar" class="navbar-bottom-wrapper fixed-on-scroll">The standard navbar with no special class — it scrolls away with the page and doesn’t come back.
Mega menu
Section titled “Mega menu”For sites with lots of pages, Shock includes a mega menu — a wide, multi-column dropdown that animates into view:
<div class="dropdown-menu megamenu animate fade-down" role="menu">