Skip to content
BaseLayer Themes

Navbar 05

Minimal bar with a slide-in drawer from the left or right

File: src/blocks/navbar/Navbar05.astro

Logo + CTA + menu button. All navigation lives in a slide-in drawer (no desktop dropdown row). Nested items use the same accordion + sections / children stack as other navbars.

Types: src/lib/nav.ts · Links: NavOverlayLinks.astro · Client: src/scripts/navbar.ts (overlay mode)

Authoring guide: Navigation components

Behavior

  • Menu button opens the drawer; backdrop click, close (×), and Escape close it.
  • side controls which edge the panel slides from (left | right, default right).
  • panelWidth sets drawer width (sm | md | lg | xl, default md).
  • Body scroll locks while open.
  • Parent links with children/sections expand as accordions inside the drawer.

Add to a page

---
import Navbar05 from "@/blocks/navbar/Navbar05.astro";
---

<Navbar05 side="left" panelWidth="lg" />

Props

Prop Type Default Notes
side "left" | "right" "right" Drawer edge
panelWidth "sm" | "md" | "lg" | "xl" "md" Drawer width preset
contained boolean false Absolute overlay for docs/previews (avoids clipped fixed)
links NavLink[] site navigation.links Same mega/children shapes as Navbar 04
ctaLabel / ctaHref / ctaSize from site config
sticky boolean site / true
dropdownIconSize number site / 20 Icons in nested sections
borderBottom / borderThickness / borderColor same as Navbar 01 Header stroke

Menu content still comes from identity.tsnavigation.links (or the links prop).

← Navbar overview · Navbar 06 →