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.
sidecontrols which edge the panel slides from (left|right, defaultright).panelWidthsets drawer width (sm|md|lg|xl, defaultmd).- 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.ts → navigation.links (or the links prop).
