Library · Navigation

Header / Split Nav

Premium branding header with nav links split either side of a centred logo on desktop; collapses to a standard bar + slide-down panel (with phone) below 900px.

Figma: Header / Split Nav ↗
Live preview — edit theme bottom-right
---
import HeaderSplit from "../components/figma/HeaderSplit.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;">
  <HeaderSplit
    logoText="Meridian"
    navItems={navItems}
    phone="07 3123 4567"
    ctaLabel="Enquire Now"
    ctaUrl="#"
    tone="base-100"
  />
  <HeaderSplit
    logoText="Meridian"
    navItems={navItems}
    phone="07 3123 4567"
    ctaLabel="Enquire Now"
    ctaUrl="#"
    tone="neutral"
  />
</div>

<p>
  Below 900px both examples collapse to a standard bar (logo centred, burger right) with a
  slide-down panel — resize the browser to see the breakpoint switch. Unlike the standard
  header, the desktop layout splits nav links either side of a centred, larger logo (up to
  ~34px), with the CTA sitting at the far right; the phone number is only shown inside the
  mobile panel, not in the desktop bar.
</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 the image logo
logoUrl string Link target for the logo
navItems NavItem[] Yes Nav items; split in half (first half right-aligned left of logo, second half left-aligned right of logo on desktop); all shown in the mobile panel
phone string Phone number, shown only inside the mobile panel
ctaLabel string CTA button label
ctaUrl string CTA button link
tone "base-100" | "base-200" | "base-300" | "primary" | "secondary" | "neutral" | "transparent" Background tone — mirrors the Figma variant axis
sticky boolean Position: sticky at the top of the viewport