Skip to content

Hero One

The Hero One block is a simple, composable hero section that displays content alongside an image in a side-by-side layout. It renders a heading, description rich text, a link group, and an image — stacking vertically on mobile and sitting side-by-side on larger screens.

Ship Polished Interfaces at Scale

A curated collection of accessible, production-ready components and content blocks designed for CMS-driven websites. Install what you need, own the code, and launch faster.

Modern workspace with a widescreen monitor displaying a clean user interface design

HeroOne 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
ContentImageRenders the hero image with responsive <picture> support

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 HeroOne in your site.

import { HeroOne } from "@/rokkit200-ui/blocks/hero/variants/hero-one/hero-one";
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 <HeroOne {...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.

Flip the image to the leading side by reversing the flex direction.

Ship Polished Interfaces at Scale

A curated collection of accessible, production-ready components and content blocks designed for CMS-driven websites. Install what you need, own the code, and launch faster.

Modern workspace with a widescreen monitor displaying a clean user interface design

Reduce padding, gaps, border radius, and heading size for a tighter presentation.

Ship Polished Interfaces at Scale

A curated collection of accessible, production-ready components and content blocks designed for CMS-driven websites. Install what you need, own the code, and launch faster.

Modern workspace with a widescreen monitor displaying a clean user interface design

Extends HeroProperties (from hero-internals).

PropTypeDefaultDescription
headingstring—The 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 ContentImage.
classNamestring—Classes applied to the root <article> element.
textContainerClassNamestring—Classes applied to the text content wrapper.
headingClassNamestring—Classes applied to the <h2> heading element.
bodyClassNamestring—Classes applied to the RichText component wrapper.
linksClassNamestring—Classes applied to the LinkGroup wrapper.
mediaContainerClassNamestring—Classes applied to the image container <div>.
mediaClassNamestring—Classes applied to the ContentImage 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 hero 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.