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.

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.

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.

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