Library · Navigation
Header / Centered
Brand-led stacked header: phone / centred logo / CTA on a 3-col grid, nav row beneath a subtle divider. Single bar + burger below 900px.
Figma: Header / Centered ↗---
import HeaderCentered from "../components/figma/HeaderCentered.astro";
const navItems = [
{ label: "Home", href: "#", current: true },
{ label: "For Sale", href: "#" },
{ label: "About Us", href: "#" },
{ label: "Testimonials", href: "#" },
{ label: "Contact Us", href: "#" },
];
---
<p class="caption">
Burger appears below 900px viewport width — resize the browser to see it
(media queries are viewport-based, not container-based).
</p>
<HeaderCentered
logoText="Aurora Estates"
navItems={navItems}
phone="07 3123 4567"
ctaLabel="Enquire Now"
ctaUrl="#enquire"
tone="base-100"
/>
<HeaderCentered
logoText="Aurora Estates"
navItems={navItems}
phone="07 3123 4567"
ctaLabel="Enquire Now"
ctaUrl="#enquire"
tone="neutral"
/> Props
| Name | Type | Required | Description |
|---|---|---|---|
logoText | string | — | Text logo (rendered when no logoImage). |
logoImage | string (url) | — | Image logo — overrides logoText. |
logoAlt | string | — | Alt text for the image logo. |
logoUrl | string | — | Logo link target (default '/'). |
navItems | NavItem[] | Yes | Nav links: { label, href, current? }. |
phone | string | — | Phone number, shown desktop-left and in the mobile panel. |
ctaLabel | string | — | Pill CTA label. |
ctaUrl | string | — | Pill CTA link. |
tone | "base-100" | "base-200" | "base-300" | "primary" | "secondary" | "neutral" | "transparent" | — | Background tone — mirrors the Figma colour-variant axis (default base-100). |
sticky | boolean | — | position: sticky at the top of the viewport. |