Library · Navigation
Header / Overlay
Transparent header absolutely positioned over hero imagery, light-on-image text with optional legibility scrim. Mobile panel is always solid base-100.
Figma: Header / Overlay ↗---
import HeaderOverlay from "../components/figma/HeaderOverlay.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">
Header / Overlay sits absolutely over hero imagery — with and without the
top-down scrim. The burger appears below 900px viewport width; resize the
browser window to see it (media queries are viewport-based, not
container-based, so shrinking this panel alone won't trigger it).
</p>
<div class="hero">
<img
src="https://images.unsplash.com/photo-1449824913935-59a10b8d2000?w=1600&q=60"
alt=""
class="hero-img"
/>
<HeaderOverlay
logoText="Meridian"
navItems={navItems}
phone="07 3123 4567"
ctaLabel="Enquire Now"
scrim={true}
/>
</div>
<div class="hero">
<img
src="https://images.unsplash.com/photo-1449824913935-59a10b8d2000?w=1600&q=60"
alt=""
class="hero-img"
/>
<HeaderOverlay
logoText="Meridian"
navItems={navItems}
phone="07 3123 4567"
ctaLabel="Enquire Now"
scrim={false}
/>
</div> 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-right and in the mobile panel. |
ctaLabel | string | — | Pill CTA label. |
ctaUrl | string | — | Pill CTA link. |
scrim | boolean | — | Top-down gradient behind the bar for legibility over imagery (default true). |