X Enterprises
nuxt-x-affiliate

Hero Landing

Full-viewport landing hero with an image or video background, overlay presets, a button row, and a scroll indicator.

Hero Landing

The full-bleed hero for home and category landing pages. Ported from nuxt-x-marketing so an affiliate site no longer needs both layers.

Three heroes, three jobs — pick by page type:

ComponentHeightUse on
<XAFHeroLanding>full viewportHome and category landing pages. Photo or video background.
<XAFPageHero>~60vhInterior pages. Coloured band, optional photo.
<XAFHero>content-sizedA single review page. Product image, rating, price, buy button.

Components

<XAFHeroLanding />

<XAFHeroLanding
  eyebrow="Reviews"
  title="Gear we actually tested"
  subtitle="Independent, hands-on reviews with no sponsored placements."
  :img="{ src: '/hero.jpg', alt: 'Workbench with tools' }"
  overlay="gradient"
  :buttons="[
    { label: 'Browse reviews', to: '/reviews' },
    { label: 'Our method', to: '/about/editorial' },
  ]"
/>

Props

PropTypeDefaultDescription
titlestring''Headline, rendered as the page <h1>
subtitlestring''Supporting paragraph
eyebrowstring''Small uppercase label above the headline
img{ src, alt? }—Background image. Ignored when video is set
video{ src, poster? }—Background video. Takes precedence over img
overlay'light' | 'heavy' | 'gradient' | 'none''gradient'Darkening layer for legible white text
buttonsXafButton[][]Button row. First is solid/primary
align'left' | 'center' | 'right''left'Content column alignment
verticalAlign'center' | 'bottom''center'Vertical position
hasScrollIndicatorbooleantrueAnimated "Scroll" hint
includeNavPaddingbooleanfalsePad the top to clear a solid header

Slots

SlotDescription
backgroundReplace the image/video layer entirely
titleRich headline markup
subtitleRich subhead markup
actionsReplace the button row

Tips

  • Pair with <XAFSiteHeader transparent /> so the header floats over the hero. Leave includeNavPadding off in that case — turn it on only when the header is solid.
  • The background carries xParallax, driven by the layer's animation plugin. Both the parallax and the text fade-in respect prefers-reduced-motion.
  • The background image is loading="eager" because it is the LCP element on any page using it.

AI Context

component: XAFHeroLanding
package: "@xenterprises/nuxt-x-affiliate"
use-when: Full-viewport landing hero with photo or video background
Copyright © 2026