Hero section patterns for landing pages and marketing sites. Centered text, split layouts, background images, forms, and video backgrounds.
Overview
Hero sections are the first thing visitors see on a landing page. These patterns use <layout-cover> for vertical centering and <layout-center> for horizontal alignment, creating responsive layouts without media queries.
The simplest hero pattern: centered headline, lead text, and call-to-action buttons. Perfect for product launches and announcements.
<section class="hero">
<layout-cover data-layout-min="70vh" data-layout-padding="xl">
<layout-center data-layout-max="normal">
<layout-stack data-layout-gap="l" class="hero-content">
<h1>Ship faster with less code</h1>
<p class="lead">
Vanilla Breeze is a lightweight CSS framework built on modern standards.
Semantic HTML, custom elements, and design tokens. No build step required.
</p>
<nav>
<ul data-layout="cluster" data-layout-justify="center" data-layout-gap="m">
<li><a href="/get-started/" class="button large">Get Started</a></li>
<li><a href="/docs/" class="button large secondary">Documentation</a></li>
</ul>
</nav>
</layout-stack>
</layout-center>
</layout-cover>
</section>
Split with Image
Text on one side, image on the other. Uses layout-sidebar for a flexible two-column layout that stacks on narrow viewports.
<section class="hero">
<layout-cover data-layout-min="60vh" data-layout-padding="xl">
<layout-center data-layout-max="wide">
<layout-sidebar data-layout-gap="2xl" data-layout-sidebar-width="wide" data-layout-content-min="50">
<layout-stack data-layout-gap="l">
<layout-badge data-variant="success">Now Available</layout-badge>
<h1>Build interfaces that scale</h1>
<p>
Start with semantic HTML and enhance with custom elements.
Our layout primitives handle the complexity so you can focus on content.
</p>
<nav>
<ul data-layout="cluster" data-layout-gap="m">
<li><a href="/get-started/" class="button">Start Building</a></li>
<li><a href="/examples/" class="button ghost">View Examples</a></li>
</ul>
</nav>
</layout-stack>
<figure class="hero-image">
<img
src="/images/hero-illustration.png"
alt="Application interface mockup"
width="600"
height="450"
loading="eager"
/>
</figure>
</layout-sidebar>
</layout-center>
</layout-cover>
</section>
With Background Image
Full-width background image with a dark overlay for text readability. The overlay uses --color-overlay-strong from design tokens.
<section class="hero hero-with-bg">
<layout-cover data-layout-min="80vh" data-layout-padding="xl">
<layout-center data-layout-max="normal">
<layout-stack data-layout-gap="l" class="hero-content">
<h1>Experience the difference</h1>
<p class="lead">
Immerse yourself in a new way of building for the web.
Modern standards, timeless simplicity.
</p>
<nav>
<ul data-layout="cluster" data-layout-justify="center" data-layout-gap="m">
<li><a href="/demo/" class="button large">Watch Demo</a></li>
<li><a href="/pricing/" class="button large ghost">View Pricing</a></li>
</ul>
</nav>
</layout-stack>
</layout-center>
</layout-cover>
</section>
Required CSS
Add these styles to support background images with overlay: