We use cookies to ensure you get the best experience on our website. Read our privacy policy

Skip to main content

Directory

Header Component

The Header component serves as the primary navigation element for your website. It features a clean, modern design with a responsive layout that adapts seamlessly to different screen sizes.

  • Check Circle

    Company logo and name that links to the home page

  • Check Circle

    Navigation links that automatically hide on mobile

  • Check Circle

    Theme selector for dark/light mode switching

  • Check Circle

    Mobile-friendly hamburger menu

To implement the header, you’ll need to import and configure it with your navigation links:

---
import Header from '@/components/NST-components/UI/header/Header.astro';
const navigation = { 'Home': '/', 'About': '/about', 'Contact': '/contact' };
---
<Header links={navigation} />

The header automatically adjusts its layout based on screen size:

  • Desktop: Full navigation menu with all links visible
  • Mobile: Compact design with hamburger menu
  • Transitions: Smooth animations for menu opening/closing
Required Props
Header Component Extends <header> HTMLElement
Prop Type Default Description
links Record<string, string> - Navigation links (key is name, value is link)
showBreadcrumb boolean false Show breadcrumb
breadcrumbProps ComponentProps<typeof Breadcrumb> Breadcrumb component props

The header includes a search menu using the pagefind search interface. You must build your site using npm run build before the search menu will work in development mode.

Limited Time Launch Sale

Build professional websites with our AstroJS starter template. Includes this header component and many more pre-built features!

GET 60% OFF!
North Star Themes Logo

Subscribe to our newsletter

Get the latest AstroJS tips and tricks right to your inbox

Email: [email protected]

© 2025 North Star Themes

Web Kit Provided By North Star Themes