Skip to main content
The HeroBanner block is the primary page-entry component. It renders a large-format hero section with a required heading, optional subheading, CTA buttons, and up to six layout variants that control whether background images appear as a carousel, a side panel, or an edge-bleed split.
heading is the only required field. All other props are optional and the block renders gracefully without them.

Props

string
required
Main hero heading. Rendered as an <h1> with bold, tightly-tracked type at 5xl8xl depending on the variant. Validated as required in Sanity Studio.
string
A supporting sentence below the heading. Rendered at lgxl with relaxed line height. Constrained to max-w-2xl in most variants.
SanityImageObject[]
Array of Sanity image objects with hotspot support. Used as an auto-advancing carousel in the centered and overlay variants; only the first image is used in split, split-asymmetric, split-bleed, and spread. Each image requires an alt string.
Button[]
Array of button objects. The first button always renders as variant="default"; subsequent buttons render as outline by default or whatever variant is set on the individual button object.
'left' | 'center' | 'right'
Controls text alignment within the content area. Defaults to center. Hidden in Studio when the variant is split, split-asymmetric, or spread (those layouts fix alignment by design).
'centered' | 'split' | 'split-asymmetric' | 'overlay' | 'spread' | 'split-bleed'
Layout variant. Defaults to centered. See Variants below for a full description of each.
'white' | 'light' | 'dark' | 'primary'
Global background colour token applied via the shared block base. Defaults to white. The block itself always uses bg-foreground text-background; this field primarily affects adjacent section spacing.
'none' | 'small' | 'default' | 'large'
Vertical padding override. Defaults to default.
'narrow' | 'default' | 'full'
Content container max-width. Defaults to default.
string
Additional CSS classes passed from the page builder renderer.
string
HTML id attribute for anchor-link targeting.

Usage in Sanity Studio

  1. Open Pages and edit or create a page.
  2. In the Blocks array, click Add item and choose Hero Banner.
  3. Fill in Heading (required) and optionally Subheading.
  4. Add one or more Background Images — each image requires alt text.
  5. Add up to two CTA Buttons (text, URL, and optional variant).
  6. Expand Layout Options to choose a Variant and set Alignment.
Upload multiple background images to activate the auto-advancing carousel in the centered and overlay variants. Carousel dot navigation appears on hover.

Variants / Options

Button fields

Each item in ctaButtons is a button object:

Example

The block emits data-gtm-category="cta" and data-gtm-label attributes on every button for Google Tag Manager click tracking. No additional configuration is required.