HeroSection

HeroSection

Properties

backgroundTemplate

The template for the background of the hero section

className

Additional CSS class names to apply to the hero section

contentAlignment (default: "center")

Horizontal alignment of the content within its area

contentPlacement (default: "bottom")

Position of the content area relative to the header

contentTone (default: "dark")

The tone for the content section, affecting text colors

contentWidth (default: "$maxWidth-content")

Width of the hero content (header + content sections)

ctaButtonIcon

The icon for the call-to-action button

ctaButtonTemplate

The template for the call-to-action button

ctaButtonText

The text for the call-to-action button

fullWidthBackground (default: true)

Whether the background should span the full width of the viewport

gap

Gap between header and content sections

headerAlignment (default: "center")

Alignment of the header content

headerTone (default: "dark")

The tone for the header section, affecting text colors

headerWidth (default: "50%")

Width of the header section in horizontal layouts

headline

The headline text for the hero section

image

The image for the hero section

imageHeight

The height of the image

imageWidth

The width of the image

mainText

The main text content for the hero section

mainTextTemplate

The template for the text content in the hero section

preamble

The preamble text for the hero section

subheadline

The subheadline text for the hero section

Events

ctaClick

Triggered when the call-to-action button is clicked

Exposed Methods

This component does not expose any methods.

Parts

The component has some parts that can be styled through layout properties and theme variables separately:
  • background: The background template area of the hero section
  • content: The content section containing image and children
  • ctaButton: The call-to-action button for the hero section
  • header: The header section containing all text content and CTA button
  • headingSection: The heading section containing preamble, headline, and subheadline
  • headline: The headline text for the hero section
  • image: The image for the hero section
  • mainText: The main text content for the hero section
  • preamble: The preamble text for the hero section
  • subheadline: The subheadline text for the hero section

Styling

Theme Variables

VariableDefault Value (Light)Default Value (Dark)
backgroundColor-headline-HeroSectionnonenone
backgroundColor-mainText-HeroSectionnonenone
backgroundColor-preamble-HeroSectionnonenone
backgroundColor-subheadline-HeroSectionnonenone
direction-headline-HeroSectionnonenone
direction-mainText-HeroSectionnonenone
direction-preamble-HeroSectionnonenone
direction-subheadline-HeroSectionnonenone
fontFamily-headline-HeroSectionnonenone
fontFamily-mainText-HeroSectionnonenone
fontFamily-preamble-HeroSectionnonenone
fontFamily-subheadline-HeroSectionnonenone
fontSize-headline-HeroSection3em3em
fontSize-mainText-HeroSection1.4em1.4em
fontSize-preamble-HeroSectionnonenone
fontSize-subheadline-HeroSection2em2em
fontStretch-headline-HeroSectionnonenone
fontStretch-mainText-HeroSectionnonenone
fontStretch-preamble-HeroSectionnonenone
fontStretch-subheadline-HeroSectionnonenone
fontStyle-headline-HeroSectionnonenone
fontStyle-mainText-HeroSectionnonenone
fontStyle-preamble-HeroSectionnonenone
fontStyle-subheadline-HeroSectionnonenone
fontVariant-headline-HeroSectionnonenone
fontVariant-mainText-HeroSectionnonenone
fontVariant-preamble-HeroSectionnonenone
fontVariant-subheadline-HeroSectionnonenone
fontWeight-headline-HeroSection$fontWeight-bold$fontWeight-bold
fontWeight-mainText-HeroSectionnonenone
fontWeight-preamble-HeroSectionnonenone
fontWeight-subheadline-HeroSection$fontWeight-bold$fontWeight-bold
gap-headline-HeroSection$space-8$space-8
gap-mainText-HeroSection$space-4$space-4
gap-preamble-HeroSectionnonenone
gap-subheadline-HeroSection$space-4$space-4
letterSpacing-headline-HeroSectionnonenone
letterSpacing-mainText-HeroSectionnonenone
letterSpacing-preamble-HeroSectionnonenone
letterSpacing-subheadline-HeroSectionnonenone
lineBreak-headline-HeroSectionnonenone
lineBreak-mainText-HeroSectionnonenone
lineBreak-preamble-HeroSectionnonenone
lineBreak-subheadline-HeroSectionnonenone
lineHeight-headline-HeroSection1.4em1.4em
lineHeight-mainText-HeroSection1.1em1.1em
lineHeight-preamble-HeroSectionnonenone
lineHeight-subheadline-HeroSection1.1em1.1em
maxWidth-contentnonenone
padding-HeroSectionnonenone
paddingBottom-HeroSection$space-12$space-12
paddingHorizontal-HeroSection$space-12$space-12
paddingLeft-HeroSectionnonenone
paddingRight-HeroSectionnonenone
paddingTop-HeroSection$space-12$space-12
paddingVertical-HeroSectionnonenone
textAlign-headline-HeroSectionnonenone
textAlign-mainText-HeroSectionnonenone
textAlign-preamble-HeroSectionnonenone
textAlign-subheadline-HeroSectionnonenone
textAlignLast-headline-HeroSectionnonenone
textAlignLast-mainText-HeroSectionnonenone
textAlignLast-preamble-HeroSectionnonenone
textAlignLast-subheadline-HeroSectionnonenone
textColor-headline-HeroSection$textColor-primary$textColor-primary
textColor-mainText-HeroSection$textColor-primary$textColor-primary
textColor-preamble-HeroSection$textColor-primary$textColor-primary
textColor-subheadline-HeroSection$textColor-primary$textColor-primary
textDecorationColor-headline-HeroSectionnonenone
textDecorationColor-mainText-HeroSectionnonenone
textDecorationColor-preamble-HeroSectionnonenone
textDecorationColor-subheadline-HeroSectionnonenone
textDecorationLine-headline-HeroSectionnonenone
textDecorationLine-mainText-HeroSectionnonenone
textDecorationLine-preamble-HeroSectionnonenone
textDecorationLine-subheadline-HeroSectionnonenone
textDecorationStyle-headline-HeroSectionnonenone
textDecorationStyle-mainText-HeroSectionnonenone
textDecorationStyle-preamble-HeroSectionnonenone
textDecorationStyle-subheadline-HeroSectionnonenone
textDecorationThickness-headline-HeroSectionnonenone
textDecorationThickness-mainText-HeroSectionnonenone
textDecorationThickness-preamble-HeroSectionnonenone
textDecorationThickness-subheadline-HeroSectionnonenone
textIndent-headline-HeroSectionnonenone
textIndent-mainText-HeroSectionnonenone
textIndent-preamble-HeroSectionnonenone
textIndent-subheadline-HeroSectionnonenone
textShadow-headline-HeroSectionnonenone
textShadow-mainText-HeroSectionnonenone
textShadow-preamble-HeroSectionnonenone
textShadow-subheadline-HeroSectionnonenone
textTransform-headline-HeroSectionnonenone
textTransform-mainText-HeroSectionnonenone
textTransform-preamble-HeroSectionnonenone
textTransform-subheadline-HeroSectionnonenone
textUnderlineOffset-headline-HeroSectionnonenone
textUnderlineOffset-mainText-HeroSectionnonenone
textUnderlineOffset-preamble-HeroSectionnonenone
textUnderlineOffset-subheadline-HeroSectionnonenone
wordBreak-headline-HeroSectionnonenone
wordBreak-mainText-HeroSectionnonenone
wordBreak-preamble-HeroSectionnonenone
wordBreak-subheadline-HeroSectionnonenone
wordSpacing-headline-HeroSectionnonenone
wordSpacing-mainText-HeroSectionnonenone
wordSpacing-preamble-HeroSectionnonenone
wordSpacing-subheadline-HeroSectionnonenone
wordWrap-headline-HeroSectionnonenone
wordWrap-mainText-HeroSectionnonenone
wordWrap-preamble-HeroSectionnonenone
wordWrap-subheadline-HeroSectionnonenone
writingMode-headline-HeroSectionnonenone
writingMode-mainText-HeroSectionnonenone
writingMode-preamble-HeroSectionnonenone
writingMode-subheadline-HeroSectionnonenone