Vanilla Breeze v0.7.4

Vanilla Breeze v0.7.4 released

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…

Read the release notes

Hero

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.

Key features:

  • Vertical centering with layout-cover
  • Configurable minimum height via data-layout-min
  • Multiple layout variants (centered, split, full-width)
  • Background image and video support
  • Embedded form integration
  • Responsive without media queries

Centered Text

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.

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.

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:

With Background Image

Full-width background image with a dark overlay for text readability. The overlay uses --color-overlay-strong from design tokens.

Required CSS

Add these styles to support background images with overlay:

With Form

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.

With Video

Hero with video background or an embedded video player. The video background version uses an overlay for text readability.

Required CSS

Add these styles for the video background effect:

Layout Configuration

Common data attributes for hero sections:

Element Attribute Values Description
layout-cover data-layout-min CSS length (e.g., 50vh, 400px) Minimum height of the hero section.
layout-cover data-layout-padding xs s m l xl 2xl Vertical padding inside the cover.
layout-center data-layout-max narrow normal wide prose Maximum content width.
layout-sidebar data-layout-sidebar-width narrow default wide Width of the sidebar column.
layout-cluster data-layout-justify start center end between Horizontal alignment of buttons.

Usage Notes

  • Height: Use vh units for viewport-relative heights. 70vh to 80vh works well for primary heroes.
  • Content width: Use normal for centered text to maintain comfortable line lengths.
  • Buttons: Use data-layout="cluster" with data-layout-justify="center" for centered layouts, or default alignment for split layouts.
  • Images: Use loading="eager" for hero images since they're above the fold.
  • Overlays: Use --color-overlay-strong for dark overlays that ensure text readability.
  • Videos: Always include poster attribute and use muted with autoplay for background videos.
  • Accessibility: Ensure sufficient color contrast with overlays and use semantic headings.

Related

Layout Cover

Cover layout element documentation

Layout Center

Center layout element documentation

Layout Sidebar

Sidebar layout element documentation

Call to Action

CTA section patterns

↑