Hero
The Hero component is a full-width banner, ideal for landing pages or section highlights. It supports a title, description, optional background image, and an optional CTA button.
Fields
-
title(required) - The main headline displayed prominently in the hero section. -
description(required) - Supporting text shown below the title. -
imageChooser(default:image) - A switchable field for background image selection:-
If
imageis selected:-
image(required) - Internal image chooser from Magnolia DAM. -
altText(optional) - Alt text for accessibility.
-
-
If
externalImageis selected:-
externalImage(required) - Full URL to the external image. -
externalImageAlt(optional) - Alt text for accessibility.
-
-
-
ctaChooser(default:noCta) - A switchable field to define if a call-to-action button is included:-
noCta -
withCta- If selected:-
ctaText(required) - Label text of the CTA button. -
ctaLink(defaultValue:internalPageLink) - Switchable between internal and external:-
If
internalPageLinkis selected:-
internalLink(required) - Page link chooser.
-
-
If
externalPageLinkis selected:-
externalLink(required) - Full URL to the external page.
-
-
-
-
-
height(default:h-screen) - Height class for the section.-
h-screen -
h-[75vh] -
h-[50vh] -
h-96 -
h-80 -
h-64
-
Behavior
-
The hero section stretches full-width and uses the defined height class.
-
Title and description are always shown.
-
If an image is provided, it’s rendered as the background of the hero.
-
If CTA is enabled:
-
A button is shown below the description.
-
The button links to the selected internal or external URL.
-
-
Styling (including text alignment, spacing, image positioning) is handled in the front-end implementation.