Library · Navigation

Header / Drawer

Boutique/creative header: minimal bar with logo, phone + CTA (hidden below 900px), and an always-visible burger that opens a slide-in right-side drawer with large stacked nav links and bottom phone/CTA.

Figma: Header / Drawer ↗
Live preview — edit theme bottom-right
---
import HeaderDrawer from "../components/figma/HeaderDrawer.astro";

const navItems = [
  { label: "Home", href: "#", current: true },
  { label: "For Sale", href: "#" },
  { label: "About Us", href: "#" },
  { label: "Testimonials", href: "#" },
  { label: "Contact Us", href: "#" },
];
---
<div style="display:flex;flex-direction:column;gap:32px;">
  <HeaderDrawer
    logoText="Logo"
    navItems={navItems}
    phone="07 3123 4567"
    ctaLabel="Enquire Now"
    tone="base-100"
  />
  <HeaderDrawer
    logoText="Logo"
    navItems={navItems}
    phone="07 3123 4567"
    ctaLabel="Enquire Now"
    tone="neutral"
  />
</div>

<p>
  The burger is visible at every viewport size for this variant — it doesn't collapse into a
  desktop nav row, so resize the browser to confirm the bar layout (logo · phone · CTA · burger)
  reflows rather than swaps components. Phone and CTA hide from the bar below 900px but always
  reappear inside the slide-in drawer. The drawer itself is intentionally always base-100/base-content
  regardless of header tone, so it stays legible on dark and transparent variants alike.
</p>

Props

NameTypeRequiredDescription
logoText string Text logo (rendered when no logoImage)
logoImage string Optional image logo URL — overrides logoText rendering
logoAlt string Alt text for logoImage
logoUrl string Link target for the logo
navItems NavItem[] Yes Nav items: { label, href, current? }
phone string Phone number, shown desktop-right and inside the drawer
ctaLabel string CTA button label
ctaUrl string CTA button link target
tone "base-100" | "base-200" | "base-300" | "primary" | "secondary" | "neutral" | "transparent" Background tone — mirrors the Figma variant axis (default base-100)
sticky boolean Position: sticky at the top of the viewport (default false)