Skip to Content

Hero banner

Audience: CMS editors and developers.

Type: HeroBlockBanner.

This banner shows a carousel of hero slides.

This banner includes the common banner props.

Hero block preview

Types

type HeroSlide = { id: string; background: ImageProps | null; video: VideoProps | null; title: Maybe<string>; titleTag: 'h1' | 'h2'; text: Maybe<string>; buttons: BannerButtons; style: Maybe<string>; theme: Theme | null; };

Properties

id●
string
required

CMS ID.

slides●
HeroSlide[]
required

Slides rendered in order.

  • background: optional image
  • video: optional video (can replace background)
  • buttons: a required group with zero to three link or contactForm actions
  • theme: optional per-slide theme

Each slide uses the shared button group. The CMS stores it in HeroSlide.buttons. Empty groups are explicit and valid.

Behavior and limits

  • If both background and video are present, the renderer must select which one takes priority.
  • Each slide has its own titleTag. The first slide can use h1, and the other slides can use h2.
  • theme is documented in Theme.

Theme surfaces

Before any active SectionMarker, each slide requests theme-hero, then theme-brand, then Page. An active marker replaces that order with its Tag, including an explicit theme-page marker. If the marker’s role is absent, the slide uses that appearance’s required Page surface. Unset or inactive markers do not change the selection.

Each slide resolves the role in its selected Theme, independently for light and dark appearance. A slide without a local Theme uses the surrounding Theme. A local Theme keeps the marker’s role request and supplies its own surface values.

The selected surface supplies normal and muted text, artwork choice, and the colors for the image gradient. Text sits over the gradient without a separate text background. Hero photographs explicitly request default artwork. Media action groups use Panel colors and actions. See Theme surfaces and section inheritance.

Example

const banner: HeroBlockBanner = { typename: BannerTypename.HeroBlock, id: 'b_123', title: null, titleTag: 'h2', titleAlign: 'left', cssId: null, cssClasses: null, mobileImmersiveStyle: false, verticalAlign: 'CENTER', slides: [ { id: 's1', background: { id: 'img1', name: 'Hero', imageRights: null, file: {} as any, mobileFile: null, alt: 'Hero', breakpoint: null, cars: [], }, video: null, title: 'Welcome', titleTag: 'h1', text: 'Intro text...', buttons: { items: [ { id: 'offers', action: 'link', text: 'View offers', style: 'primary', theme: null, url: { label: 'View offers', isAbsolute: false, url: '/offers', query: [], }, contactForm: null, }, ], align: 'left', width: 'intrinsic', overflow: 'wrap', }, style: null, theme: null, }, ], };
Last updated on