0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…
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.hero centers the text and sets a minimum height; adding .alt gives it the raised surface background.
Centered hero with CTA buttons
<sectionclass="hero alt"><layout-coverdata-layout-min="m"data-layout-padding="xl"><layout-centerdata-layout-max="normal"><layout-stackdata-layout-gap="l"><h1>Ship faster with less code</h1><pclass="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><uldata-layout="cluster"data-layout-justify="center"data-layout-gap="m"><li><ahref="/get-started/"class="button large">Get Started</a></li><li><ahref="/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. data-layout-align="start" on the stack keeps the badge at its natural width.
Split layout with image
<sectionclass="hero alt"><layout-coverdata-layout-min="m"data-layout-padding="xl"><layout-centerdata-layout-max="wide"><layout-sidebardata-layout-gap="2xl"data-layout-sidebar-width="wide"data-layout-content-min="m"><layout-stackdata-layout-gap="l"data-layout-align="start"><layout-badgedata-color="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><uldata-layout="cluster"data-layout-gap="m"><li><ahref="/get-started/"class="button">Start Building</a></li><li><ahref="/examples/"class="button ghost">View Examples</a></li></ul></nav></layout-stack><figure><imgsrc="/images/hero-illustration.png"alt="Application interface mockup"width="600"height="450"loading="eager" /></figure></layout-sidebar></layout-center></layout-cover></section>
Start-aligned split heroes
section.hero centers its text, which suits the single-column variants. Split heroes (this one and the form hero below) read better start-aligned:
Start-align split heroes
section.hero layout-sidebar {text-align: start;}
With Background Image
Full-width background image with a dark overlay for text readability. The overlay uses --color-overlay-strong from design tokens.
Hero with background image
<sectionclass="hero hero-with-bg"><layout-coverdata-layout-min="l"data-layout-padding="xl"><layout-centerdata-layout-max="normal"><layout-stackdata-layout-gap="l"><h1>Experience the difference</h1><pclass="lead"> Immerse yourself in a new way of building for the web. Modern standards, timeless simplicity.</p><nav><uldata-layout="cluster"data-layout-justify="center"data-layout-gap="m"><li><ahref="/demo/"class="button large">Watch Demo</a></li><li><ahref="/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:
Hero with an embedded newsletter signup or registration form. Uses layout-sidebar to place content and form side by side, and <ul data-marker="check"> for the benefit list.
Hero with signup form
<sectionclass="hero alt"><layout-coverdata-layout-min="m"data-layout-padding="xl"><layout-centerdata-layout-max="wide"><layout-sidebardata-layout-gap="2xl"data-layout-sidebar-width="wide"data-layout-content-min="m"><layout-stackdata-layout-gap="l"><h1>Stay in the loop</h1><pclass="lead"> Get the latest updates on new features, best practices, and community highlights delivered to your inbox.</p><uldata-marker="check"><li>Weekly digest</li><li>No spam</li><li>Unsubscribe anytime</li></ul></layout-stack><layout-carddata-variant="outlined"><formaction="/subscribe"method="POST"data-layout="stack"data-layout-gap="m"><h2>Subscribe to our newsletter</h2><form-field><labelfor="name">Name</label><inputtype="text"id="name"name="name"requiredautocomplete="name"placeholder="Your name" /></form-field><form-field><labelfor="email">Email</label><inputtype="email"id="email"name="email"requiredautocomplete="email"placeholder="[email protected]" /></form-field><buttontype="submit"class="full-width">Subscribe</button><p><small>By subscribing, you agree to our <ahref="/privacy/">Privacy Policy</a>.</small></p></form></layout-card></layout-sidebar></layout-center></layout-cover></section>
With Video
Hero with video background or an embedded video player. The video background version uses an overlay for text readability.
Hero with video background
<sectionclass="hero hero-video-bg"><videoautoplaymutedloopplaysinlineposter="/images/video-poster.jpg"><sourcesrc="/videos/hero-bg.mp4"type="video/mp4" /></video><layout-coverdata-layout-min="l"data-layout-padding="xl"><layout-centerdata-layout-max="normal"><layout-stackdata-layout-gap="l"><h1>See it in action</h1><pclass="lead"> Watch how teams are building faster with modern CSS. No frameworks, no complexity, just clean code.</p><nav><uldata-layout="cluster"data-layout-justify="center"data-layout-gap="m"><li><ahref="/demo/"class="button large">Play Full Video</a></li><li><ahref="/get-started/"class="button large ghost">Get Started</a></li></ul></nav></layout-stack></layout-center></layout-cover></section>