Use the controls below to customize the component styles and build
your own preset.
Header Blocks for Astro
Astro header and navigation blocks with desktop links and mobile menus. Compare layouts and install editable source with the shadcn CLI.
Header blocks render their default slot once, in the desktop actions area.
Use slot="mobile" for actions that should appear inside the mobile menu.
Navigation items are rendered as real links in both layouts.
Set mobileMenu="drawer" to use the Mobile Menu drawer
in any header. It includes child links, actions, and the mobile slot.
The default is mobileMenu="sheet". The drawer closes when the viewport reaches
the desktop breakpoint at 1024px.
<HeaderJustifiedNavActions {...headerProps} mobileMenu="drawer"> <a href="/call">Book a call</a> <a slot="mobile" href="/call">Book a call</a></HeaderJustifiedNavActions>
When updating an existing header, move or copy the intended mobile actions
into the named slot. Keep element IDs unique between the two slots.
---import HeaderMediaMenu from "@/components/blocks/header/header-media-menu.astro"import Logo from "@/assets/gnostic-ai-logo.svg"import placeholderImage from "@/assets/placeholder.webp"---<HeaderMediaMenu mobileMenu="drawer" logo={{ label: "Halden", href: "https://example.com/halden", src: Logo, }} navigation={[ { label: "Services", href: "https://example.com/halden/services", description: "Automations for the repeated work in a service business.", image: { src: placeholderImage, alt: "Sample image of a workflow review", }, links: [ { label: "Workflows", href: "https://example.com/halden/services/workflows", description: "Connect the tools a team already uses and remove repeated steps.", icon: "workflow", }, { label: "Lead response", href: "https://example.com/halden/services/lead-response", description: "Answer a new inquiry before it waits in a shared inbox.", icon: "inbox", }, { label: "Reporting", href: "https://example.com/halden/services/reporting", description: "Send a weekly summary from the systems the business already runs.", icon: "chart-column", }, ], }, { label: "Work", href: "https://example.com/halden/work", description: "Recent automations for service teams.", links: [ { label: "Case studies", href: "https://example.com/halden/work/case-studies", description: "Read how a service team replaced a manual handoff.", icon: "book-open", }, { label: "Industries", href: "https://example.com/halden/work/industries", description: "See the service businesses Halden works with.", icon: "building", }, ], }, { label: "Process", href: "https://example.com/halden/process" }, { label: "About", href: "https://example.com/halden/about" }, ]} actions={[ { label: "See the work", href: "https://example.com/halden/work", variant: "ghost", }, { label: "Book a call", href: "https://example.com/halden/call", variant: "default", }, ]}/>
---import HeaderMultiColumnMenu from "@/components/blocks/header/header-multi-column-menu.astro"import Logo from "@/assets/gnostic-ai-logo.svg"import placeholderImage from "@/assets/placeholder.webp"---<HeaderMultiColumnMenu mobileMenu="drawer" logo={{ label: "Halden", href: "https://example.com/halden", src: Logo, }} navigation={[ { label: "Services", href: "https://example.com/halden/services", description: "Automations for the repeated work in a service business.", image: { src: placeholderImage, alt: "Sample image of a workflow review", }, links: [ { label: "Workflows", href: "https://example.com/halden/services/workflows", description: "Connect the tools a team already uses and remove repeated steps.", icon: "workflow", }, { label: "Lead response", href: "https://example.com/halden/services/lead-response", description: "Answer a new inquiry before it waits in a shared inbox.", icon: "inbox", }, { label: "Reporting", href: "https://example.com/halden/services/reporting", description: "Send a weekly summary from the systems the business already runs.", icon: "chart-column", }, { label: "Onboarding", href: "https://example.com/halden/services/onboarding", description: "Move a new client from a signed agreement to the first delivery.", icon: "clipboard-check", }, ], }, { label: "Work", href: "https://example.com/halden/work", description: "Recent automations for service teams.", links: [ { label: "Case studies", href: "https://example.com/halden/work/case-studies", description: "Read how a service team replaced a manual handoff.", icon: "book-open", }, { label: "Industries", href: "https://example.com/halden/work/industries", description: "See the service businesses Halden works with.", icon: "building", }, ], }, { label: "Process", href: "https://example.com/halden/process" }, { label: "About", href: "https://example.com/halden/about" }, ]} actions={[ { label: "See the work", href: "https://example.com/halden/work", variant: "ghost", }, { label: "Book a call", href: "https://example.com/halden/call", variant: "default", }, ]}/>
Pass logo, navigation, and actions to the selected block. Some variants support a sheet or drawer mobile menu. Use real hrefs and keep link labels consistent between desktop and mobile views.
Test the width at which the navigation changes layout with actual labels. Open and close the mobile menu with a keyboard and confirm focus returns to its trigger. Supply separate logo artwork for light and dark mode when the mark needs it.