Hero Section

Hero banner section

Marketing BlockHero

Overview

HeroSection renders the primary above-the-fold section of a marketing page. Choose from four variant layouts:

  • centered — headline and CTAs horizontally centered, optional content slot below.
  • split — two-column layout with text on the left and an image on the right.
  • video — full-bleed background video with centered overlay content (forces dark mode).
  • gradient — centered layout with a custom CSS gradient layer behind the content.

Usage

import { HeroSection } from '@leanicon/web-builder-library'
;<HeroSection
  variant="centered"
  headline="Build faster with great UI"
  subtext="Production-ready React components."
  primaryCTA={{ label: 'Get started', href: '/signup' }}
  secondaryCTA={{ label: 'View docs', href: '/docs' }}
/>

Variants

Centered

Build faster with great UI

A collection of production-ready React components styled with Tailwind CSS.

With badge

New

Introducing web-builder-library v2

Everything you need to ship beautiful marketing pages.

Split (with image)

Pass any element as children to render in the right column of the split layout.

Ship marketing pages in minutes

Composable blocks, dark mode ready, and accessible out of the box.

App dashboard screenshot

Split (with custom content)

The children slot accepts any element — not just images.

Built for modern teams

Deploy in seconds, iterate in real time.

10x

Faster development

Video background

The video variant automatically enables dark mode. Provide a looping background video via videoSrc.

Experience the difference

Immersive backgrounds, bold typography, zero configuration.

Gradient

Pass one of the named section bands to background. It renders as an aria-hidden overlay behind the content.

Inside a page you do not set this: RenderBlocks paints the band on the block wrapper from the editor's Section background choice, and enforces the rule that two gradients never sit next to each other.

Beautiful by default

Gradient backgrounds with no extra work.

Dark color scheme

Dark mode hero

All semantic tokens adapt automatically.

Primary CTA only

Ready to get started?

Animated background (aurora)

Use the backgroundSlot prop to layer an AnimatedBackground behind the content. Color presets adapt the palette instantly.

Next-gen design system

GPU-composited aurora animation, no main thread blocking.

Animated background (grid)

The spotlight orbits freely, follows the cursor on hover, and resumes its orbit when the cursor leaves.

Precision engineering

Animated dot grid with cursor-aware spotlight.

Animated background (particles)

Effortless motion

Floating particles with staggered drift animations.

Notes

  • In split variant, children render in the right column (media slot). In other variants, children render below the headline and CTAs.
  • The image prop still works as a shorthand for split — if no children are provided, it renders the image in the right column.
  • The video variant always renders inside a <div class="dark"> regardless of colorScheme.
  • The section is wrapped in <section aria-label="Hero"> for landmark navigation.
  • Prefer the dark bands (grad-ink-brand, grad-deep) behind light hero copy. Note grad-deep will not carry muted text — ink-400 on it is only 3.26:1.
  • All four variants are fully responsive — single column on mobile, multi-column on lg breakpoint.

Props

NameTypeDefaultRequiredDescription
variantenum—Yes
badgestring—No
headlinestring—Yes
subtextstring—No
primaryCTACTAButton—No
secondaryCTACTAButton—No
imageImageProps—No
videoSrcstring—No
backgroundenum—NoA named section band, for standalone use (stories, the showcase, the published library). Inside a page the adapter does NOT pass this — RenderBlocks paints the band on the block wrapper, so setting it here too would draw the same gradient twice. Replaces a free-text `gradientClass`, which interpolated an arbitrary CMS string straight into `cn()`.
backgroundSlotReactNode—No
animationHeroSectionAnimation—No
colorSchemeenum—No
classNamestring—No
headingLevelenum—NoHeading level for the headline (spec 007, Research D7). Defaults to h1 — the hero is the de-facto page title on blocks-only pages. Pages that render their own <h1> above the blocks pass headingContext="section" to RenderBlocks, which demotes this to h2.
ctaCTAButton—Yes