Skip to content

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.

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.

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">

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">