Skip to content

Hero Two

The Hero Two block is a full-bleed hero section that layers text content over a background image. It renders a heading, description rich text, a link group, and a cover image — the image fills the entire block background while text overlays on top.

Lorem ipsum

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Hero Image

HeroTwo is assembled from the following components:

ComponentRole
RichTextRenders the hero body as structured rich text
LinkGroupRenders the call-to-action links with primary/secondary variant slots
CoverImageRenders the background image as a full-bleed cover

Shared internals (hero-internals) provide the HeroProperties type, image profile, and CMS mapper utilities used by all hero variants.

Below is an example of how to use HeroTwo in your site.

import { HeroTwo } from "@/rokkit200-ui/blocks/hero/variants/hero-two/hero-two";
import { mapCmsType } from "@/rokkit200-ui/lib/content-mapper/content-mapper-util";
import { heroCmsMappers } from "@/rokkit200-ui/blocks/hero/internals/lib/hero-utils";
const properties = mapCmsType(heroCmsMappers, heroResponse);
return <HeroTwo {...properties!} />;

All visual customisation is done via className props. No additional CSS or theme tokens are required — pass Tailwind classes to adjust layout, spacing, typography, and media styling.

Centre-align the text overlay and spread the body text to full width.

Lorem ipsum

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Hero Image

Reduce vertical margins, border radius, and heading size for a tighter presentation.

Lorem ipsum

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Hero Image

Extends HeroProperties (from hero-internals).

PropTypeDefaultDescription
headingstringThe hero heading text. Required.
mainBodyRichTextNode[]Structured rich text nodes for the body content.
linksLinkItem[]Array of link items rendered via LinkGroup.
media{ imageSource, profile }Image source and responsive picture profile for CoverImage.
classNamestringClasses applied to the root <article> element.
textContainerClassNamestringClasses applied to the text content wrapper.
headingClassNamestringClasses applied to the <h2> heading element.
bodyClassNamestringClasses applied to the RichText component wrapper.
linksClassNamestringClasses applied to the LinkGroup wrapper.
mediaContainerClassNamestringClasses applied to the image container (unused in this variant — reserved for consistency).
mediaClassNamestringClasses applied to the CoverImage element.
  • The root element is an <article> with aria-labelledby pointing to the heading, providing a labelled landmark for assistive technology.
  • The heading renders as an <h2>. Ensure it fits the document outline where the block is placed.
  • The cover image receives loading="eager" and fetchPriority="high" to prioritise above-the-fold rendering.
  • Links inherit accessibility behaviour from the Link component, including safe rel tokens for external targets.
  • Because text overlays the image, ensure sufficient colour contrast between the text and the underlying image. Consider adding a semi-transparent overlay via className if the source image varies.