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 5xl–8xl depending on the variant. Validated as required in Sanity Studio.string
A supporting sentence below the heading. Rendered at
lg–xl 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
- Open Pages and edit or create a page.
- In the Blocks array, click Add item and choose Hero Banner.
- Fill in Heading (required) and optionally Subheading.
- Add one or more Background Images — each image requires alt text.
- Add up to two CTA Buttons (text, URL, and optional variant).
- Expand Layout Options to choose a Variant and set Alignment.
Variants / Options
Button fields
Each item inctaButtons 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.