Skip to main content
Our new developer certification is live!

Hero

Hero section component for landing pages with title, description, search, CTAs, and optional components.

Props

PropTypeRequiredDefaultDescription
titlestringNo-Hero title
title_tag'h1' | 'h2' | 'h3' | 'p'No-HTML tag for title
title_variantTypographyVariantNo'hero-text'Typography variant for title styling
descriptionJSONRTENo-Rich text description
show_searchbooleanNo-Whether to show search bar
ctasCtaWrapper[]No-Array of CTA buttons
componentsHeroComponents[]No-Additional components (e.g., Media)
$CSLPFieldMappingNo-CSLP mapping for editable fields

Usage

import { Hero } from '@/components/organisms/Hero';

<Hero
  title="Welcome to Our Platform"
  title_tag="h1"
  description={richTextContent}
  show_search={true}
  ctas={[
    { cta: { link: { href: "/signup", title: "Get Started" }, variant: "PrimaryFillButton" } }
  ]}
/>

Features

  • Flexible layout: Two-column layout on desktop (content + components)
  • Rich text: Supports rich text description
  • Search bar: Optional search functionality
  • Multiple CTAs: Supports multiple call-to-action buttons
  • Component support: Can include Media or other hero components
  • Responsive: Stacks vertically on mobile

Layout

  • Left column (3.5 flex): Title, description, search, CTAs
  • Right column (2 flex): Optional components (Media, etc.)

Notes

  • Uses Title component with "hero-text" variant
  • Description uses RichTextRenderer with prose styling
  • CTAs are wrapped in flex container with gap-4
  • Components rendered using ComponentsRenderer
  • The first media component inside the hero is prioritized for faster LCP