Skip to content
ui8kit

block / marketing

Hero Split

A split hero with figures, faces, small cards or a quote under the lead, beside a picture, a floating card, a picture grid or plan cards.

Install

npx ui8kit add hero-split

Pulls in: action-group, error-page, feature-grid, hero-split-extras, hero-split-media, pricing-card, section-frame, stats-band, store-hero, testimonial-grid, utils

Preview

New in 2.0

Ship pages your team can trust

Plain blocks, one dictionary of texts and eight runtimes from the same specs.

12,400

Sites published

99.99%

Uptime

3,200

Teams

Code

Point the CLI at this runtime once, then add the item:

npx ui8kit init --yes --framework svelte --dir src --registry-url https://registry.buildy.tw/svelte --strict-cdn
npx ui8kit add hero-split
blocks/hero-split.svelte
<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->
<!--
  A split hero: a badge, the heading, a lead, an extra under it and one or two actions, beside the media. Axes:
  extra (stats: three figures, avatars: faces and a proof line, minis: two small feature cards, quote: a quote
  over three figures, none), media (picture, card: a floating card on the picture, grid: four pictures with
  captions, plans: two plan cards on the picture), mediaSide, tone.
-->
<script lang="ts" module>
  import type { Snippet } from "svelte";
  import type { HeroContent } from "./hero-split.types";
  import type { Stat } from "./stats-band.types";
  import type { Feature } from "./feature-grid.types";
  import type { Quote } from "./testimonial-grid.types";
  import type { OfferCard } from "./store-hero.types";
  import type { Plan } from "./pricing-card.types";
  import type { LinkActions } from "./error-page.types";

  export type HeroSplitProps = {
    id: string;
    title: string;
    lead?: string;
    badge?: string;
    level?: 1 | 2;
    actions: LinkActions;
    content: HeroContent;
    extra?: "stats" | "avatars" | "minis" | "quote" | "none";
    media?: "picture" | "card" | "grid" | "plans";
    mediaSide?: "end" | "start";
    tone?: "default" | "muted";
    image?: string;
    imageAlt?: string;
    landmarkLabel?: string;
  };
</script>

<script lang="ts">
  import ActionGroup from "../components/action-group.svelte";
  import HeroSplitExtras from "../components/hero-split-extras.svelte";
  import HeroSplitMedia from "../components/hero-split-media.svelte";
  import SectionFrame from "../components/section-frame.svelte";

  let {
    id,
    title,
    lead = "",
    badge = "",
    level = 1,
    actions,
    content,
    extra = "stats",
    media = "picture",
    mediaSide = "end",
    tone = "default",
    image,
    imageAlt,
    landmarkLabel,
  }: HeroSplitProps = $props();
</script>

<SectionFrame
  id={id}
  title={title}
  lead={lead}
  heading={{ badge, level }}
  layout="split"
  media={{ show: true, side: mediaSide }}
  tone={tone}
  landmarkLabel={landmarkLabel}
>
  <HeroSplitExtras content={content} extra={extra} />
  <ActionGroup
    primary={actions.cta}
    primaryHref={actions.href}
    secondary={((actions.mode === "two") ? actions.secondary : undefined)}
    secondaryHref={actions.secondaryHref}
  />
  {#snippet aside()}
    <HeroSplitMedia content={content} alt={(imageAlt ? imageAlt : title)} image={image} media={media} />
  {/snippet}
</SectionFrame>
blocks/hero-split.types.ts
// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.

import type { Stat } from "./stats-band.types";
import type { Feature } from "./feature-grid.types";
import type { Quote } from "./testimonial-grid.types";
import type { OfferCard } from "./store-hero.types";
import type { Plan } from "./pricing-card.types";

export type HeroContent = {
  stats: Stat[];
  features: Feature[];
  people: Quote[];
  plans: Plan[];
  proof: string;
  card: OfferCard;
};

Svelte registry item (JSON)

Point the CLI at this runtime once, then add the item:

npx ui8kit init --yes --framework react --dir src --registry-url https://registry.buildy.tw/react --strict-cdn
npx ui8kit add hero-split
blocks/hero-split.tsx
// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
/**
 * A split hero: a badge, the heading, a lead, an extra under it and one or two actions, beside the media. Axes:
 * extra (stats: three figures, avatars: faces and a proof line, minis: two small feature cards, quote: a quote
 * over three figures, none), media (picture, card: a floating card on the picture, grid: four pictures with
 * captions, plans: two plan cards on the picture), mediaSide, tone.
 */
import { type ReactNode } from "react";
import { ActionGroup } from "../components/action-group";
import { HeroSplitExtras } from "../components/hero-split-extras";
import { HeroSplitMedia } from "../components/hero-split-media";
import { SectionFrame } from "../components/section-frame";
import type { HeroContent } from "./hero-split.types";
import type { Stat } from "./stats-band.types";
import type { Feature } from "./feature-grid.types";
import type { Quote } from "./testimonial-grid.types";
import type { OfferCard } from "./store-hero.types";
import type { Plan } from "./pricing-card.types";
import type { LinkActions } from "./error-page.types";

export type HeroSplitProps = {
  id: string;
  title: string;
  lead?: string;
  badge?: string;
  level?: 1 | 2;
  actions: LinkActions;
  content: HeroContent;
  extra?: "stats" | "avatars" | "minis" | "quote" | "none";
  media?: "picture" | "card" | "grid" | "plans";
  mediaSide?: "end" | "start";
  tone?: "default" | "muted";
  image?: string;
  imageAlt?: string;
  landmarkLabel?: string;
};

export function HeroSplit({
  id,
  title,
  lead = "",
  badge = "",
  level = 1,
  actions,
  content,
  extra = "stats",
  media = "picture",
  mediaSide = "end",
  tone = "default",
  image,
  imageAlt,
  landmarkLabel,
}: HeroSplitProps) {
  return (
    <SectionFrame
      id={id}
      title={title}
      lead={lead}
      heading={{ badge, level }}
      layout="split"
      media={{ show: true, side: mediaSide }}
      tone={tone}
      landmarkLabel={landmarkLabel}
      aside={(
        <HeroSplitMedia content={content} alt={(imageAlt ? imageAlt : title)} image={image} media={media} />
      )}
    >
      <HeroSplitExtras content={content} extra={extra} />
      <ActionGroup
        primary={actions.cta}
        primaryHref={actions.href}
        secondary={((actions.mode === "two") ? actions.secondary : undefined)}
        secondaryHref={actions.secondaryHref}
      />
    </SectionFrame>
  );
}
blocks/hero-split.types.ts
// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.

import type { Stat } from "./stats-band.types";
import type { Feature } from "./feature-grid.types";
import type { Quote } from "./testimonial-grid.types";
import type { OfferCard } from "./store-hero.types";
import type { Plan } from "./pricing-card.types";

export type HeroContent = {
  stats: Stat[];
  features: Feature[];
  people: Quote[];
  plans: Plan[];
  proof: string;
  card: OfferCard;
};

React registry item (JSON)

Point the CLI at this runtime once, then add the item:

npx ui8kit init --yes --framework vue --dir src --registry-url https://registry.buildy.tw/vue --strict-cdn
npx ui8kit add hero-split
blocks/hero-split.types.ts
// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.

import type { Stat } from "./stats-band.types";
import type { Feature } from "./feature-grid.types";
import type { Quote } from "./testimonial-grid.types";
import type { OfferCard } from "./store-hero.types";
import type { Plan } from "./pricing-card.types";

export type HeroContent = {
  stats: Stat[];
  features: Feature[];
  people: Quote[];
  plans: Plan[];
  proof: string;
  card: OfferCard;
};
blocks/hero-split.vue
<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->
<!--
  A split hero: a badge, the heading, a lead, an extra under it and one or two actions, beside the media. Axes:
  extra (stats: three figures, avatars: faces and a proof line, minis: two small feature cards, quote: a quote
  over three figures, none), media (picture, card: a floating card on the picture, grid: four pictures with
  captions, plans: two plan cards on the picture), mediaSide, tone.
-->
<script lang="ts">
import type { HeroContent } from "./hero-split.types";
import type { Stat } from "./stats-band.types";
import type { Feature } from "./feature-grid.types";
import type { Quote } from "./testimonial-grid.types";
import type { OfferCard } from "./store-hero.types";
import type { Plan } from "./pricing-card.types";
import type { LinkActions } from "./error-page.types";

export type HeroSplitProps = {
  id: string;
  title: string;
  lead?: string;
  badge?: string;
  level?: 1 | 2;
  actions: LinkActions;
  content: HeroContent;
  extra?: "stats" | "avatars" | "minis" | "quote" | "none";
  media?: "picture" | "card" | "grid" | "plans";
  mediaSide?: "end" | "start";
  tone?: "default" | "muted";
  image?: string;
  imageAlt?: string;
  landmarkLabel?: string;
};
</script>

<script setup lang="ts">
import ActionGroup from "../components/action-group.vue";
import HeroSplitExtras from "../components/hero-split-extras.vue";
import HeroSplitMedia from "../components/hero-split-media.vue";
import SectionFrame from "../components/section-frame.vue";

const {
  id,
  title,
  lead = "",
  badge = "",
  level = 1,
  actions,
  content,
  extra = "stats",
  media = "picture",
  mediaSide = "end",
  tone = "default",
  image,
  imageAlt,
  landmarkLabel,
} = defineProps<HeroSplitProps>();
</script>

<template>
  <SectionFrame
    :id="id"
    :title="title"
    :lead="lead"
    :heading="{ badge, level }"
    layout="split"
    :media="{ show: true, side: mediaSide }"
    :tone="tone"
    :landmarkLabel="landmarkLabel"
  >
    <HeroSplitExtras :content="content" :extra="extra" />
    <ActionGroup
      :primary="actions.cta"
      :primaryHref="actions.href"
      :secondary="((actions.mode === 'two') ? actions.secondary : undefined)"
      :secondaryHref="actions.secondaryHref"
    />
    <template #aside>
      <HeroSplitMedia :content="content" :alt="(imageAlt ? imageAlt : title)" :image="image" :media="media" />
    </template>
  </SectionFrame>
</template>

Vue registry item (JSON)

Point the CLI at this runtime once, then add the item:

npx ui8kit init --yes --framework solid --dir src --registry-url https://registry.buildy.tw/solid --strict-cdn
npx ui8kit add hero-split
blocks/hero-split.tsx
// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
/**
 * A split hero: a badge, the heading, a lead, an extra under it and one or two actions, beside the media. Axes:
 * extra (stats: three figures, avatars: faces and a proof line, minis: two small feature cards, quote: a quote
 * over three figures, none), media (picture, card: a floating card on the picture, grid: four pictures with
 * captions, plans: two plan cards on the picture), mediaSide, tone.
 */
import { type JSX } from "solid-js";
import { ActionGroup } from "../components/action-group";
import { HeroSplitExtras } from "../components/hero-split-extras";
import { HeroSplitMedia } from "../components/hero-split-media";
import { SectionFrame } from "../components/section-frame";
import type { HeroContent } from "./hero-split.types";
import type { Stat } from "./stats-band.types";
import type { Feature } from "./feature-grid.types";
import type { Quote } from "./testimonial-grid.types";
import type { OfferCard } from "./store-hero.types";
import type { Plan } from "./pricing-card.types";
import type { LinkActions } from "./error-page.types";

export type HeroSplitProps = {
  id: string;
  title: string;
  lead?: string;
  badge?: string;
  level?: 1 | 2;
  actions: LinkActions;
  content: HeroContent;
  extra?: "stats" | "avatars" | "minis" | "quote" | "none";
  media?: "picture" | "card" | "grid" | "plans";
  mediaSide?: "end" | "start";
  tone?: "default" | "muted";
  image?: string;
  imageAlt?: string;
  landmarkLabel?: string;
};

export function HeroSplit({
  id,
  title,
  lead = "",
  badge = "",
  level = 1,
  actions,
  content,
  extra = "stats",
  media = "picture",
  mediaSide = "end",
  tone = "default",
  image,
  imageAlt,
  landmarkLabel,
}: HeroSplitProps) {
  return (
    <SectionFrame
      id={id}
      title={title}
      lead={lead}
      heading={{ badge, level }}
      layout="split"
      media={{ show: true, side: mediaSide }}
      tone={tone}
      landmarkLabel={landmarkLabel}
      aside={(
        <HeroSplitMedia content={content} alt={(imageAlt ? imageAlt : title)} image={image} media={media} />
      )}
    >
      <HeroSplitExtras content={content} extra={extra} />
      <ActionGroup
        primary={actions.cta}
        primaryHref={actions.href}
        secondary={((actions.mode === "two") ? actions.secondary : undefined)}
        secondaryHref={actions.secondaryHref}
      />
    </SectionFrame>
  );
}
blocks/hero-split.types.ts
// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.

import type { Stat } from "./stats-band.types";
import type { Feature } from "./feature-grid.types";
import type { Quote } from "./testimonial-grid.types";
import type { OfferCard } from "./store-hero.types";
import type { Plan } from "./pricing-card.types";

export type HeroContent = {
  stats: Stat[];
  features: Feature[];
  people: Quote[];
  plans: Plan[];
  proof: string;
  card: OfferCard;
};

Solid registry item (JSON)

Point the CLI at this runtime once, then add the item:

npx ui8kit init --yes --framework templ --dir src --registry-url https://registry.buildy.tw/templ --strict-cdn
npx ui8kit add hero-split
blocks/hero-split.templ
// Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
// Source: packages/compose-gen/specs/organisms/hero-split.json

package blocks

import (
	uiutils "github.com/ui8kit/codegen/generated/templ/orgutils"
)

// HeroSplitProps are the props of HeroSplit; the values are the JSON shapes of the TypeScript props.
type HeroSplitProps struct {
	Id any `json:"id"`
	Title any `json:"title"`
	Lead any `json:"lead"`
	Badge any `json:"badge"`
	Level any `json:"level"`
	Actions any `json:"actions"`
	Content any `json:"content"`
	Extra any `json:"extra"`
	Media any `json:"media"`
	MediaSide any `json:"mediaSide"`
	Tone any `json:"tone"`
	Image any `json:"image"`
	ImageAlt any `json:"imageAlt"`
	LandmarkLabel any `json:"landmarkLabel"`
}

// A split hero: a badge, the heading, a lead, an extra under it and one or two actions, beside the media. Axes: extra (stats: three figures, avatars: faces and a proof line, minis: two small feature cards, quote: a quote over three figures, none), media (picture, card: a floating card on the picture, grid: four pictures with captions, plans: two plan cards on the picture), mediaSide, tone.
templ HeroSplit(p HeroSplitProps) {
	{{ vId := p.Id }}
	{{ vTitle := p.Title }}
	{{ vLead := uiutils.Def(p.Lead, "") }}
	{{ vBadge := uiutils.Def(p.Badge, "") }}
	{{ vLevel := uiutils.Def(p.Level, float64(1)) }}
	{{ vActions := p.Actions }}
	{{ vContent := p.Content }}
	{{ vExtra := uiutils.Def(p.Extra, "stats") }}
	{{ vMedia := uiutils.Def(p.Media, "picture") }}
	{{ vMediaSide := uiutils.Def(p.MediaSide, "end") }}
	{{ vTone := uiutils.Def(p.Tone, "default") }}
	{{ vImage := p.Image }}
	{{ vImageAlt := p.ImageAlt }}
	{{ vLandmarkLabel := p.LandmarkLabel }}
	@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Lead: vLead, Heading: map[string]any{"badge": vBadge, "level": vLevel}, Layout: "split", Media: map[string]any{"show": true, "side": vMediaSide}, Tone: vTone, LandmarkLabel: vLandmarkLabel, Aside: heroSplitFill1(p, vTitle, vContent, vMedia, vImage, vImageAlt)}) {
		@HeroSplitExtras(HeroSplitExtrasProps{Content: vContent, Extra: vExtra})
		@ActionGroup(ActionGroupProps{Primary: uiutils.Get(vActions, "cta"), PrimaryHref: uiutils.Get(vActions, "href"), Secondary: uiutils.Cond(uiutils.T(uiutils.Eq(uiutils.Get(vActions, "mode"), "two")), uiutils.Get(vActions, "secondary"), nil), SecondaryHref: uiutils.Get(vActions, "secondaryHref")})
	}
}

templ heroSplitFill1(p HeroSplitProps, vTitle any, vContent any, vMedia any, vImage any, vImageAlt any) {
	@HeroSplitMedia(HeroSplitMediaProps{Content: vContent, Alt: uiutils.Cond(uiutils.T(vImageAlt), vImageAlt, vTitle), Image: vImage, Media: vMedia})
}

templ registry item (JSON)

Point the CLI at this runtime once, then add the item:

npx ui8kit init --yes --framework twig --dir src --registry-url https://registry.buildy.tw/twig --strict-cdn
npx ui8kit add hero-split
blocks/hero-split.html.twig
{#- Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
    Source: packages/compose-gen/specs/organisms/hero-split.json
    A split hero: a badge, the heading, a lead, an extra under it and one or two actions, beside the media. Axes: extra (stats: three figures, avatars: faces and a proof line, minis: two small feature cards, quote: a quote over three figures, none), media (picture, card: a floating card on the picture, grid: four pictures with captions, plans: two plan cards on the picture), mediaSide, tone.
    Props (p): id, title, lead, badge, level, actions, content, extra, media, mediaSide, tone, image, imageAlt, landmarkLabel. -#}
{%- set v_id = (p.id ?? null) -%}
{%- set v_title = (p.title ?? null) -%}
{%- set v_lead = (p.lead ?? '') -%}
{%- set v_badge = (p.badge ?? '') -%}
{%- set v_level = (p.level ?? 1) -%}
{%- set v_actions = (p.actions ?? null) -%}
{%- set v_content = (p.content ?? null) -%}
{%- set v_extra = (p.extra ?? 'stats') -%}
{%- set v_media = (p.media ?? 'picture') -%}
{%- set v_mediaSide = (p.mediaSide ?? 'end') -%}
{%- set v_tone = (p.tone ?? 'default') -%}
{%- set v_image = (p.image ?? null) -%}
{%- set v_imageAlt = (p.imageAlt ?? null) -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- set f_1 -%}
  {{ include('blocks/hero-split-media.html.twig', {'p': {'content': v_content, 'alt': (og_t(v_imageAlt) ? v_imageAlt : v_title), 'image': v_image, 'media': v_media}}, with_context = false) }}
{%- endset -%}
{%- set c_2 -%}
  {{ include('blocks/hero-split-extras.html.twig', {'p': {'content': v_content, 'extra': v_extra}}, with_context = false) }}
  {{ include('blocks/action-group.html.twig', {'p': {'primary': og_get(v_actions, ['cta']), 'primaryHref': og_get(v_actions, ['href']), 'secondary': (og_t(og_eq(og_get(v_actions, ['mode']), 'two')) ? og_get(v_actions, ['secondary']) : null), 'secondaryHref': og_get(v_actions, ['secondaryHref'])}}, with_context = false) }}
{%- endset -%}
{{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'heading': {'badge': v_badge, 'level': v_level}, 'layout': 'split', 'media': {'show': true, 'side': v_mediaSide}, 'tone': v_tone, 'landmarkLabel': v_landmarkLabel, 'aside': og_markup(f_1)}, 'children': og_markup(c_2)}, with_context = false) }}

Twig registry item (JSON)

Point the CLI at this runtime once, then add the item:

npx ui8kit init --yes --framework latte --dir src --registry-url https://registry.buildy.tw/latte --strict-cdn
npx ui8kit add hero-split
blocks/hero-split.latte
{* Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
    Source: packages/compose-gen/specs/organisms/hero-split.json
    A split hero: a badge, the heading, a lead, an extra under it and one or two actions, beside the media. Axes: extra (stats: three figures, avatars: faces and a proof line, minis: two small feature cards, quote: a quote over three figures, none), media (picture, card: a floating card on the picture, grid: four pictures with captions, plans: two plan cards on the picture), mediaSide, tone.
    Props (p): id, title, lead, badge, level, actions, content, extra, media, mediaSide, tone, image, imageAlt, landmarkLabel. *}
{var $v_id = ($p['id'] ?? null)}
{var $v_title = ($p['title'] ?? null)}
{var $v_lead = ($p['lead'] ?? '')}
{var $v_badge = ($p['badge'] ?? '')}
{var $v_level = ($p['level'] ?? 1)}
{var $v_actions = ($p['actions'] ?? null)}
{var $v_content = ($p['content'] ?? null)}
{var $v_extra = ($p['extra'] ?? 'stats')}
{var $v_media = ($p['media'] ?? 'picture')}
{var $v_mediaSide = ($p['mediaSide'] ?? 'end')}
{var $v_tone = ($p['tone'] ?? 'default')}
{var $v_image = ($p['image'] ?? null)}
{var $v_imageAlt = ($p['imageAlt'] ?? null)}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{capture $f_1}
  {=og_include('blocks/hero-split-media.latte', ['p' => ['content' => $v_content, 'alt' => (og_t($v_imageAlt) ? $v_imageAlt : $v_title), 'image' => $v_image, 'media' => $v_media]])|noescape}
{/capture}
{capture $c_2}
  {=og_include('blocks/hero-split-extras.latte', ['p' => ['content' => $v_content, 'extra' => $v_extra]])|noescape}
  {=og_include('blocks/action-group.latte', ['p' => ['primary' => og_get($v_actions, ['cta']), 'primaryHref' => og_get($v_actions, ['href']), 'secondary' => (og_t(og_eq(og_get($v_actions, ['mode']), 'two')) ? og_get($v_actions, ['secondary']) : null), 'secondaryHref' => og_get($v_actions, ['secondaryHref'])]])|noescape}
{/capture}
{=og_include('blocks/section-frame.latte', ['p' => ['id' => $v_id, 'title' => $v_title, 'lead' => $v_lead, 'heading' => ['badge' => $v_badge, 'level' => $v_level], 'layout' => 'split', 'media' => ['show' => true, 'side' => $v_mediaSide], 'tone' => $v_tone, 'landmarkLabel' => $v_landmarkLabel, 'aside' => og_markup($f_1)], 'children' => og_markup($c_2)])|noescape}

Latte registry item (JSON)

Point the CLI at this runtime once, then add the item:

npx ui8kit init --yes --framework jinja2 --dir src --registry-url https://registry.buildy.tw/jinja2 --strict-cdn
npx ui8kit add hero-split
blocks/hero-split.html.j2
{#- Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
    Source: packages/compose-gen/specs/organisms/hero-split.json
    A split hero: a badge, the heading, a lead, an extra under it and one or two actions, beside the media. Axes: extra (stats: three figures, avatars: faces and a proof line, minis: two small feature cards, quote: a quote over three figures, none), media (picture, card: a floating card on the picture, grid: four pictures with captions, plans: two plan cards on the picture), mediaSide, tone.
    Props (p): id, title, lead, badge, level, actions, content, extra, media, mediaSide, tone, image, imageAlt, landmarkLabel. -#}
{%- set v_id = og_def(p['id'], none) -%}
{%- set v_title = og_def(p['title'], none) -%}
{%- set v_lead = og_def(p['lead'], '') -%}
{%- set v_badge = og_def(p['badge'], '') -%}
{%- set v_level = og_def(p['level'], 1) -%}
{%- set v_actions = og_def(p['actions'], none) -%}
{%- set v_content = og_def(p['content'], none) -%}
{%- set v_extra = og_def(p['extra'], 'stats') -%}
{%- set v_media = og_def(p['media'], 'picture') -%}
{%- set v_mediaSide = og_def(p['mediaSide'], 'end') -%}
{%- set v_tone = og_def(p['tone'], 'default') -%}
{%- set v_image = og_def(p['image'], none) -%}
{%- set v_imageAlt = og_def(p['imageAlt'], none) -%}
{%- set v_landmarkLabel = og_def(p['landmarkLabel'], none) -%}
{%- set f_1 -%}
  {{ og_include('blocks/hero-split-media.html.j2', {'p': {'content': v_content, 'alt': (v_imageAlt if og_t(v_imageAlt) else v_title), 'image': v_image, 'media': v_media}}) }}
{%- endset -%}
{%- set c_2 -%}
  {{ og_include('blocks/hero-split-extras.html.j2', {'p': {'content': v_content, 'extra': v_extra}}) }}
  {{ og_include('blocks/action-group.html.j2', {'p': {'primary': og_get(v_actions, ['cta']), 'primaryHref': og_get(v_actions, ['href']), 'secondary': (og_get(v_actions, ['secondary']) if og_t(og_eq(og_get(v_actions, ['mode']), 'two')) else none), 'secondaryHref': og_get(v_actions, ['secondaryHref'])}}) }}
{%- endset -%}
{{ og_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'heading': {'badge': v_badge, 'level': v_level}, 'layout': 'split', 'media': {'show': true, 'side': v_mediaSide}, 'tone': v_tone, 'landmarkLabel': v_landmarkLabel, 'aside': og_markup(f_1)}, 'children': og_markup(c_2)}) }}

Jinja2 registry item (JSON)

Props

Names and types come from the xgen specs of the source. Standard HTML attributes (id, role, tabIndex, aria-*) pass through to the root element; the class prop is className in React.

A split hero: a badge, the heading, a lead, an extra under it and one or two actions, beside the media. Axes: extra (stats: three figures, avatars: faces and a proof line, minis: two small feature cards, quote: a quote over three figures, none), media (picture, card: a floating card on the picture, grid: four pictures with captions, plans: two plan cards on the picture), mediaSide, tone.

Props of HeroSplit
PropTypeDefault Description
id (required)string-
title (required)string-
lead string""
badge string""a short pill above the heading
level 1 | 21
actions (required)LinkActions-
content (required)HeroContent-
extra "stats" | "avatars" | "minis" | "quote" | "none""stats"
media "picture" | "card" | "grid" | "plans""picture"
mediaSide "end" | "start""end"
tone "default" | "muted""default"
image string-address of the picture (an https URL or a path); none: the placeholder
imageAlt string-alt text of the picture; none: the title
landmarkLabel string-accessible name of the landmark of this component when the page shows it more than once (a variant); replaces the heading name of the root landmark, follows the name of a nested one

Used in