Main Nav

Header navigation combining logo, links, and actions.

---
import Button from "@core-elements/button/Button.astro";
import MainNav from "@navigation/main-nav/MainNav.astro";
---

<MainNav
buttonSections={
  [
    {
      "_component": "building-blocks/core-elements/button",
      "link": "#",
      "variant": "ghost",
      "size": "lg",
      "text": "Search",
      "hideText": true,
      "iconName": "magnifying-glass"
    },
    {
      "_component": "building-blocks/core-elements/button",
      "link": "#",
      "text": "Careers",
      "variant": "ghost",
      "iconName": "arrow-top-right-on-square",
      "iconPosition": "after",
      "_target": "blank",
      "rel": "noopener noreferrer"
    }
  ]
} logoAlt="Logo" logoSource="/src/assets/images/component-docs/logo.svg" navData={
  [
    {
      "name": "Home",
      "path": "#",
      "children": []
    },
    {
      "name": "Resources",
      "path": "#",
      "children": [
        {
          "name": "Blog",
          "path": "#",
          "children": []
        },
        {
          "name": "Documentation",
          "path": "#",
          "children": []
        },
        {
          "name": "Support",
          "path": "#",
          "children": []
        }
      ]
    },
    {
      "name": "Contact",
      "path": "#",
      "children": []
    }
  ]
}
/>
---
blocks:
  _component: navigation/main-nav
  logoSource: /src/assets/images/component-docs/logo.svg
  logoAlt: Logo
  navData:
    - name: Home
      path: '#'
      children: []
    - name: Resources
      path: '#'
      children:
        - name: Blog
          path: '#'
          children: []
        - name: Documentation
          path: '#'
          children: []
        - name: Support
          path: '#'
          children: []
    - name: Contact
      path: '#'
      children: []
  buttonSections:
    - _component: building-blocks/core-elements/button
      link: '#'
      variant: ghost
      size: lg
      text: Search
      hideText: true
      iconName: magnifying-glass
    - _component: building-blocks/core-elements/button
      link: '#'
      text: Careers
      variant: ghost
      iconName: arrow-top-right-on-square
      iconPosition: after
      _target: blank
      rel: noopener noreferrer
---

Overview

A complete header navigation component that combines a logo, navigation links, and action buttons. Includes Bar and Mobile for responsive layouts that automatically switch between desktop and mobile views.

Properties

logoSource string

logoAlt string | default: Logo

navData string | default: array

buttonSections string | default: array