X Enterprises
nuxt-x-affiliate

Site Header

Sticky site-wide header with logo, primary nav, search trigger, and CTA. Auto-emits WebSite schema via the site chrome.

Site Header

The XAFSiteHeader component renders the site-wide sticky header. It pairs with <XAFSiteFooter> and <XAFMegaMenu> to form the full site chrome.

Components

<XAFSiteHeader />

<XAFSiteHeader>
  <template #nav>
    <NuxtLink to="/categories">Categories</NuxtLink>
    <NuxtLink to="/reviews">Reviews</NuxtLink>
    <NuxtLink to="/about">About</NuxtLink>
  </template>

  <template #cta>
    <UButton to="/newsletter" color="primary">Subscribe</UButton>
  </template>
</XAFSiteHeader>

Props

PropTypeDefaultDescription
transparentbooleanfalseRender a transparent header that becomes solid on scroll
stickybooleantrueStick to the top of the viewport

Slots

SlotDescription
brandLogo / brand mark (defaults to xAffiliate.brand.name)
navPrimary navigation links
ctaRight-aligned CTA (subscribe button, login, etc.)
searchCustom search trigger (defaults to a button that opens <XAFSearchBar>)

Tips

  • Pair with <XAFMegaMenu> for dropdown navigation: render the <XAFMegaMenu> inside the nav slot.
  • For sticky headers, leave a padding-top on your page wrapper equal to the header height to prevent content from being hidden under the sticky bar.
  • The header reads xAffiliate.brand from app config for the default logo + name.

AI Context

component: XAFSiteHeader
package: "@xenterprises/nuxt-x-affiliate"
use-when: Site-wide sticky header with brand, nav, search, and CTA
Copyright © 2026