Skip to content
ui8kit

block / commerce

Store Hero

The hero of a store with promises under the actions, beside a picture with an offer card or over a faint picture.

Install

npx ui8kit add store-hero

Pulls in: action-group, backdrop, box, compose, error-page, feature-grid, grid, group, kit-box, kit-text, lucide-icon, offer-media, section-frame, stack, text, utils

Preview

New season

Everything for a calm desk, delivered in two hours

Lamps, bags and desk goods from small workshops. Order before 20:00 and pick a window that suits you.

Free shipping over $75

Two-hour windows, seven days a week.

Thirty-day returns

Send it back for free if it does not fit your desk.

Two-year warranty

Repairs or a new one, whichever is faster.

Minus 15% on lighting

With the code DESK15 until Sunday.

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 store-hero
blocks/store-hero.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. -->
<!--
  The hero of a store: a badge, the heading, a lead, one or two actions and three store promises. The overlay
  layout puts a picture beside the text with an offer card floating on it; the backdrop layout puts the text
  over a faint picture. Axes: layout (overlay, backdrop), mediaSide, tone.
-->
<script lang="ts" module>
  import type { Snippet } from "svelte";
  import type { OfferCard } from "./store-hero.types";
  import type { Feature } from "./feature-grid.types";
  import type { LinkActions } from "./error-page.types";

  export type StoreHeroProps = {
    id: string;
    title: string;
    lead?: string;
    badge?: string;
    level?: 1 | 2;
    actions: LinkActions;
    perks: Feature[];
    card: OfferCard;
    layout?: "overlay" | "backdrop";
    mediaSide?: "end" | "start";
    tone?: "default" | "muted";
    image?: string;
    imageAlt?: string;
    landmarkLabel?: string;
  };
</script>

<script lang="ts">
  import Box from "../compose/Box.svelte";
  import Grid from "../compose/Grid.svelte";
  import Group from "../compose/Group.svelte";
  import LucideIcon from "../icons/LucideIcon.svelte";
  import Stack from "../compose/Stack.svelte";
  import Text from "../compose/Text.svelte";
  import ActionGroup from "../components/action-group.svelte";
  import Backdrop from "../components/backdrop.svelte";
  import OfferMedia from "../components/offer-media.svelte";
  import SectionFrame from "../components/section-frame.svelte";

  let {
    id,
    title,
    lead = "",
    badge = "",
    level = 1,
    actions,
    perks,
    card,
    layout = "overlay",
    mediaSide = "end",
    tone = "default",
    image,
    imageAlt,
    landmarkLabel,
  }: StoreHeroProps = $props();
</script>

{#if ((layout as string) === "backdrop")}
  <SectionFrame
    id={id}
    title={title}
    lead={lead}
    heading={{ badge, level }}
    tone={tone}
    density="roomy"
    measure="3xl"
    class={(("image" === "image") ? "relative isolate overflow-hidden" : "")}
    landmarkLabel={landmarkLabel}
  >
    <Backdrop kind="image" alt={(imageAlt ? imageAlt : title)} image={image} />
    <ActionGroup
      primary={actions.cta}
      primaryHref={actions.href}
      secondary={((actions.mode === "two") ? actions.secondary : undefined)}
      secondaryHref={actions.secondaryHref}
    />
    {#if ((perks?.length ?? 0) > 0)}
      <Grid cols="1-3" class="gap-4" data-slot="perks">
        {#each perks as p, i (p.id)}
          {#if (i < 3)}
            <Group gap="4" align="start" data-slot="perk">
              <Box class="flex size-10 shrink-0 items-center justify-center rounded bg-muted">
                <LucideIcon name={p.icon} size={20} />
              </Box>
              <Stack gap="0">
                <Text size="sm" weight="semibold">
                  {p.title}
                </Text>
                <Text size="xs" class="text-muted-foreground">
                  {p.text}
                </Text>
              </Stack>
            </Group>
          {/if}
        {/each}
      </Grid>
    {/if}
  </SectionFrame>
{:else}
  <SectionFrame
    id={id}
    title={title}
    lead={lead}
    heading={{ badge, level }}
    layout="split"
    media={{ show: true, side: mediaSide }}
    tone={tone}
    landmarkLabel={landmarkLabel}
  >
    <ActionGroup
      primary={actions.cta}
      primaryHref={actions.href}
      secondary={((actions.mode === "two") ? actions.secondary : undefined)}
      secondaryHref={actions.secondaryHref}
    />
    {#if ((perks?.length ?? 0) > 0)}
      <Grid cols="1-3" class="gap-4" data-slot="perks">
        {#each perks as p, i (p.id)}
          {#if (i < 3)}
            <Group gap="4" align="start" data-slot="perk">
              <Box class="flex size-10 shrink-0 items-center justify-center rounded bg-muted">
                <LucideIcon name={p.icon} size={20} />
              </Box>
              <Stack gap="0">
                <Text size="sm" weight="semibold">
                  {p.title}
                </Text>
                <Text size="xs" class="text-muted-foreground">
                  {p.text}
                </Text>
              </Stack>
            </Group>
          {/if}
        {/each}
      </Grid>
    {/if}
    {#snippet aside()}
      <OfferMedia alt={(imageAlt ? imageAlt : title)} image={image} card={card} />
    {/snippet}
  </SectionFrame>
{/if}
blocks/store-hero.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.

export type OfferCard = {
  title: string;
  text: string;
  icon: string;
};

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 store-hero
blocks/store-hero.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.
/**
 * The hero of a store: a badge, the heading, a lead, one or two actions and three store promises. The overlay
 * layout puts a picture beside the text with an offer card floating on it; the backdrop layout puts the text
 * over a faint picture. Axes: layout (overlay, backdrop), mediaSide, tone.
 */
import { Fragment, type ReactNode } from "react";
import { Box, Grid, Group, Stack, Text } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import { ActionGroup } from "../components/action-group";
import { Backdrop } from "../components/backdrop";
import { OfferMedia } from "../components/offer-media";
import { SectionFrame } from "../components/section-frame";
import type { OfferCard } from "./store-hero.types";
import type { Feature } from "./feature-grid.types";
import type { LinkActions } from "./error-page.types";

export type StoreHeroProps = {
  id: string;
  title: string;
  lead?: string;
  badge?: string;
  level?: 1 | 2;
  actions: LinkActions;
  perks: Feature[];
  card: OfferCard;
  layout?: "overlay" | "backdrop";
  mediaSide?: "end" | "start";
  tone?: "default" | "muted";
  image?: string;
  imageAlt?: string;
  landmarkLabel?: string;
};

export function StoreHero({
  id,
  title,
  lead = "",
  badge = "",
  level = 1,
  actions,
  perks,
  card,
  layout = "overlay",
  mediaSide = "end",
  tone = "default",
  image,
  imageAlt,
  landmarkLabel,
}: StoreHeroProps) {
  return (
    <>
      {((layout as string) === "backdrop") ? (
        <SectionFrame
          id={id}
          title={title}
          lead={lead}
          heading={{ badge, level }}
          tone={tone}
          density="roomy"
          measure="3xl"
          className={(("image" === "image") ? "relative isolate overflow-hidden" : "")}
          landmarkLabel={landmarkLabel}
        >
          <Backdrop kind="image" alt={(imageAlt ? imageAlt : title)} image={image} />
          <ActionGroup
            primary={actions.cta}
            primaryHref={actions.href}
            secondary={((actions.mode === "two") ? actions.secondary : undefined)}
            secondaryHref={actions.secondaryHref}
          />
          {((perks?.length ?? 0) > 0) ? (
            <Grid cols="1-3" className="gap-4" data-slot="perks">
              {(perks ?? []).map((p, i) => (
                <Fragment key={p.id}>
                  {(i < 3) ? (
                    <Group gap="4" align="start" data-slot="perk">
                      <Box className="flex size-10 shrink-0 items-center justify-center rounded bg-muted">
                        <LucideIcon name={p.icon} size={20} />
                      </Box>
                      <Stack gap="0">
                        <Text size="sm" weight="semibold">
                          {p.title}
                        </Text>
                        <Text size="xs" className="text-muted-foreground">
                          {p.text}
                        </Text>
                      </Stack>
                    </Group>
                  ) : null}
                </Fragment>
              ))}
            </Grid>
          ) : null}
        </SectionFrame>
      ) : (
        <SectionFrame
          id={id}
          title={title}
          lead={lead}
          heading={{ badge, level }}
          layout="split"
          media={{ show: true, side: mediaSide }}
          tone={tone}
          landmarkLabel={landmarkLabel}
          aside={(
            <OfferMedia alt={(imageAlt ? imageAlt : title)} image={image} card={card} />
          )}
        >
          <ActionGroup
            primary={actions.cta}
            primaryHref={actions.href}
            secondary={((actions.mode === "two") ? actions.secondary : undefined)}
            secondaryHref={actions.secondaryHref}
          />
          {((perks?.length ?? 0) > 0) ? (
            <Grid cols="1-3" className="gap-4" data-slot="perks">
              {(perks ?? []).map((p, i) => (
                <Fragment key={p.id}>
                  {(i < 3) ? (
                    <Group gap="4" align="start" data-slot="perk">
                      <Box className="flex size-10 shrink-0 items-center justify-center rounded bg-muted">
                        <LucideIcon name={p.icon} size={20} />
                      </Box>
                      <Stack gap="0">
                        <Text size="sm" weight="semibold">
                          {p.title}
                        </Text>
                        <Text size="xs" className="text-muted-foreground">
                          {p.text}
                        </Text>
                      </Stack>
                    </Group>
                  ) : null}
                </Fragment>
              ))}
            </Grid>
          ) : null}
        </SectionFrame>
      )}
    </>
  );
}
blocks/store-hero.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.

export type OfferCard = {
  title: string;
  text: string;
  icon: string;
};

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 store-hero
blocks/store-hero.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.

export type OfferCard = {
  title: string;
  text: string;
  icon: string;
};
blocks/store-hero.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. -->
<!--
  The hero of a store: a badge, the heading, a lead, one or two actions and three store promises. The overlay
  layout puts a picture beside the text with an offer card floating on it; the backdrop layout puts the text
  over a faint picture. Axes: layout (overlay, backdrop), mediaSide, tone.
-->
<script lang="ts">
import type { OfferCard } from "./store-hero.types";
import type { Feature } from "./feature-grid.types";
import type { LinkActions } from "./error-page.types";

export type StoreHeroProps = {
  id: string;
  title: string;
  lead?: string;
  badge?: string;
  level?: 1 | 2;
  actions: LinkActions;
  perks: Feature[];
  card: OfferCard;
  layout?: "overlay" | "backdrop";
  mediaSide?: "end" | "start";
  tone?: "default" | "muted";
  image?: string;
  imageAlt?: string;
  landmarkLabel?: string;
};
</script>

<script setup lang="ts">
import Box from "../compose/Box.vue";
import Grid from "../compose/Grid.vue";
import Group from "../compose/Group.vue";
import LucideIcon from "../icons/LucideIcon.vue";
import Stack from "../compose/Stack.vue";
import Text from "../compose/Text.vue";
import ActionGroup from "../components/action-group.vue";
import Backdrop from "../components/backdrop.vue";
import OfferMedia from "../components/offer-media.vue";
import SectionFrame from "../components/section-frame.vue";

const {
  id,
  title,
  lead = "",
  badge = "",
  level = 1,
  actions,
  perks,
  card,
  layout = "overlay",
  mediaSide = "end",
  tone = "default",
  image,
  imageAlt,
  landmarkLabel,
} = defineProps<StoreHeroProps>();
</script>

<template>
  <SectionFrame v-if="((layout as string) === 'backdrop')"
    :id="id"
    :title="title"
    :lead="lead"
    :heading="{ badge, level }"
    :tone="tone"
    density="roomy"
    measure="3xl"
    :class="(('image' === 'image') ? 'relative isolate overflow-hidden' : '')"
    :landmarkLabel="landmarkLabel"
  >
    <Backdrop kind="image" :alt="(imageAlt ? imageAlt : title)" :image="image" />
    <ActionGroup
      :primary="actions.cta"
      :primaryHref="actions.href"
      :secondary="((actions.mode === 'two') ? actions.secondary : undefined)"
      :secondaryHref="actions.secondaryHref"
    />
    <Grid v-if="((perks?.length ?? 0) > 0)" cols="1-3" class="gap-4" data-slot="perks">
      <template v-for="(p, i) in perks" :key="p.id">
        <Group v-if="(i < 3)" gap="4" align="start" data-slot="perk">
          <Box class="flex size-10 shrink-0 items-center justify-center rounded bg-muted">
            <LucideIcon :name="p.icon" :size="20" />
          </Box>
          <Stack gap="0">
            <Text size="sm" weight="semibold">
              {{ p.title }}
            </Text>
            <Text size="xs" class="text-muted-foreground">
              {{ p.text }}
            </Text>
          </Stack>
        </Group>
      </template>
    </Grid>
  </SectionFrame>
  <SectionFrame v-else
    :id="id"
    :title="title"
    :lead="lead"
    :heading="{ badge, level }"
    layout="split"
    :media="{ show: true, side: mediaSide }"
    :tone="tone"
    :landmarkLabel="landmarkLabel"
  >
    <ActionGroup
      :primary="actions.cta"
      :primaryHref="actions.href"
      :secondary="((actions.mode === 'two') ? actions.secondary : undefined)"
      :secondaryHref="actions.secondaryHref"
    />
    <Grid v-if="((perks?.length ?? 0) > 0)" cols="1-3" class="gap-4" data-slot="perks">
      <template v-for="(p, i) in perks" :key="p.id">
        <Group v-if="(i < 3)" gap="4" align="start" data-slot="perk">
          <Box class="flex size-10 shrink-0 items-center justify-center rounded bg-muted">
            <LucideIcon :name="p.icon" :size="20" />
          </Box>
          <Stack gap="0">
            <Text size="sm" weight="semibold">
              {{ p.title }}
            </Text>
            <Text size="xs" class="text-muted-foreground">
              {{ p.text }}
            </Text>
          </Stack>
        </Group>
      </template>
    </Grid>
    <template #aside>
      <OfferMedia :alt="(imageAlt ? imageAlt : title)" :image="image" :card="card" />
    </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 store-hero
blocks/store-hero.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.
/**
 * The hero of a store: a badge, the heading, a lead, one or two actions and three store promises. The overlay
 * layout puts a picture beside the text with an offer card floating on it; the backdrop layout puts the text
 * over a faint picture. Axes: layout (overlay, backdrop), mediaSide, tone.
 */
import { For, type JSX } from "solid-js";
import { Box, Grid, Group, Stack, Text } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import { ActionGroup } from "../components/action-group";
import { Backdrop } from "../components/backdrop";
import { OfferMedia } from "../components/offer-media";
import { SectionFrame } from "../components/section-frame";
import type { OfferCard } from "./store-hero.types";
import type { Feature } from "./feature-grid.types";
import type { LinkActions } from "./error-page.types";

export type StoreHeroProps = {
  id: string;
  title: string;
  lead?: string;
  badge?: string;
  level?: 1 | 2;
  actions: LinkActions;
  perks: Feature[];
  card: OfferCard;
  layout?: "overlay" | "backdrop";
  mediaSide?: "end" | "start";
  tone?: "default" | "muted";
  image?: string;
  imageAlt?: string;
  landmarkLabel?: string;
};

export function StoreHero({
  id,
  title,
  lead = "",
  badge = "",
  level = 1,
  actions,
  perks,
  card,
  layout = "overlay",
  mediaSide = "end",
  tone = "default",
  image,
  imageAlt,
  landmarkLabel,
}: StoreHeroProps) {
  return (
    <>
      {((layout as string) === "backdrop") ? (
        <SectionFrame
          id={id}
          title={title}
          lead={lead}
          heading={{ badge, level }}
          tone={tone}
          density="roomy"
          measure="3xl"
          class={(("image" === "image") ? "relative isolate overflow-hidden" : "")}
          landmarkLabel={landmarkLabel}
        >
          <Backdrop kind="image" alt={(imageAlt ? imageAlt : title)} image={image} />
          <ActionGroup
            primary={actions.cta}
            primaryHref={actions.href}
            secondary={((actions.mode === "two") ? actions.secondary : undefined)}
            secondaryHref={actions.secondaryHref}
          />
          {((perks?.length ?? 0) > 0) ? (
            <Grid cols="1-3" class="gap-4" data-slot="perks">
              <For each={perks ?? []}>{(p, iOf) => { const i = iOf(); return (
                <>
                  {(i < 3) ? (
                    <Group gap="4" align="start" data-slot="perk">
                      <Box class="flex size-10 shrink-0 items-center justify-center rounded bg-muted">
                        <LucideIcon name={p.icon} size={20} />
                      </Box>
                      <Stack gap="0">
                        <Text size="sm" weight="semibold">
                          {p.title}
                        </Text>
                        <Text size="xs" class="text-muted-foreground">
                          {p.text}
                        </Text>
                      </Stack>
                    </Group>
                  ) : null}
                </>
              ); }}</For>
            </Grid>
          ) : null}
        </SectionFrame>
      ) : (
        <SectionFrame
          id={id}
          title={title}
          lead={lead}
          heading={{ badge, level }}
          layout="split"
          media={{ show: true, side: mediaSide }}
          tone={tone}
          landmarkLabel={landmarkLabel}
          aside={(
            <OfferMedia alt={(imageAlt ? imageAlt : title)} image={image} card={card} />
          )}
        >
          <ActionGroup
            primary={actions.cta}
            primaryHref={actions.href}
            secondary={((actions.mode === "two") ? actions.secondary : undefined)}
            secondaryHref={actions.secondaryHref}
          />
          {((perks?.length ?? 0) > 0) ? (
            <Grid cols="1-3" class="gap-4" data-slot="perks">
              <For each={perks ?? []}>{(p, iOf) => { const i = iOf(); return (
                <>
                  {(i < 3) ? (
                    <Group gap="4" align="start" data-slot="perk">
                      <Box class="flex size-10 shrink-0 items-center justify-center rounded bg-muted">
                        <LucideIcon name={p.icon} size={20} />
                      </Box>
                      <Stack gap="0">
                        <Text size="sm" weight="semibold">
                          {p.title}
                        </Text>
                        <Text size="xs" class="text-muted-foreground">
                          {p.text}
                        </Text>
                      </Stack>
                    </Group>
                  ) : null}
                </>
              ); }}</For>
            </Grid>
          ) : null}
        </SectionFrame>
      )}
    </>
  );
}
blocks/store-hero.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.

export type OfferCard = {
  title: string;
  text: string;
  icon: string;
};

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 store-hero
blocks/store-hero.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/store-hero.json

package blocks

import (
	"github.com/ui8kit/codegen/generated/templ/ui/box"
	"github.com/ui8kit/codegen/generated/templ/compose"
	"github.com/ui8kit/codegen/generated/templ/icons"
	"github.com/ui8kit/codegen/generated/templ/ui/text"
	uiutils "github.com/ui8kit/codegen/generated/templ/orgutils"
)

// StoreHeroProps are the props of StoreHero; the values are the JSON shapes of the TypeScript props.
type StoreHeroProps 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"`
	Perks any `json:"perks"`
	Card any `json:"card"`
	Layout any `json:"layout"`
	MediaSide any `json:"mediaSide"`
	Tone any `json:"tone"`
	Image any `json:"image"`
	ImageAlt any `json:"imageAlt"`
	LandmarkLabel any `json:"landmarkLabel"`
}

// The hero of a store: a badge, the heading, a lead, one or two actions and three store promises. The overlay layout puts a picture beside the text with an offer card floating on it; the backdrop layout puts the text over a faint picture. Axes: layout (overlay, backdrop), mediaSide, tone.
templ StoreHero(p StoreHeroProps) {
	{{ 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 }}
	{{ vPerks := p.Perks }}
	{{ vCard := p.Card }}
	{{ vLayout := uiutils.Def(p.Layout, "overlay") }}
	{{ vMediaSide := uiutils.Def(p.MediaSide, "end") }}
	{{ vTone := uiutils.Def(p.Tone, "default") }}
	{{ vImage := p.Image }}
	{{ vImageAlt := p.ImageAlt }}
	{{ vLandmarkLabel := p.LandmarkLabel }}
	if uiutils.Eq(vLayout, "backdrop") {
		@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Lead: vLead, Heading: map[string]any{"badge": vBadge, "level": vLevel}, Tone: vTone, Density: "roomy", Measure: "3xl", Class: uiutils.Cnv(uiutils.Cond(uiutils.T(uiutils.Eq("image", "image")), "relative isolate overflow-hidden", "")), LandmarkLabel: vLandmarkLabel}) {
			@Backdrop(BackdropProps{Kind: "image", Alt: uiutils.Cond(uiutils.T(vImageAlt), vImageAlt, vTitle), Image: vImage})
			@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")})
			if uiutils.Gt(uiutils.Len(vPerks), float64(0)) {
				@compose.Grid(compose.GridProps{Cols: "1-3", BoxProps: box.BoxProps{Class: "gap-4", Attrs: uiutils.Attrs("data-slot", "perks")}}) {
					for vI, vP := range uiutils.L(vPerks) {
						if uiutils.Lt(float64(vI), float64(3)) {
							@compose.Group(compose.GroupProps{Gap: "4", Align: "start", BoxProps: box.BoxProps{Attrs: uiutils.Attrs("data-slot", "perk")}}) {
								@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: "flex size-10 shrink-0 items-center justify-center rounded bg-muted"}}) {
									@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(uiutils.Get(vP, "icon")), Size: 20})
								}
								@compose.Stack(compose.StackProps{Gap: "0", BoxProps: box.BoxProps{}}) {
									@compose.Text(compose.TextProps{Size: "sm", Weight: "semibold", TextProps: text.TextProps{}}) {
										{ uiutils.Text(uiutils.Get(vP, "title")) }
									}
									@compose.Text(compose.TextProps{Size: "xs", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
										{ uiutils.Text(uiutils.Get(vP, "text")) }
									}
								}
							}
						}
					}
				}
			}
		}
	} else {
		@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: storeHeroFill1(p, vTitle, vCard, vImage, vImageAlt)}) {
			@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")})
			if uiutils.Gt(uiutils.Len(vPerks), float64(0)) {
				@compose.Grid(compose.GridProps{Cols: "1-3", BoxProps: box.BoxProps{Class: "gap-4", Attrs: uiutils.Attrs("data-slot", "perks")}}) {
					for vI, vP := range uiutils.L(vPerks) {
						if uiutils.Lt(float64(vI), float64(3)) {
							@compose.Group(compose.GroupProps{Gap: "4", Align: "start", BoxProps: box.BoxProps{Attrs: uiutils.Attrs("data-slot", "perk")}}) {
								@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: "flex size-10 shrink-0 items-center justify-center rounded bg-muted"}}) {
									@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(uiutils.Get(vP, "icon")), Size: 20})
								}
								@compose.Stack(compose.StackProps{Gap: "0", BoxProps: box.BoxProps{}}) {
									@compose.Text(compose.TextProps{Size: "sm", Weight: "semibold", TextProps: text.TextProps{}}) {
										{ uiutils.Text(uiutils.Get(vP, "title")) }
									}
									@compose.Text(compose.TextProps{Size: "xs", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
										{ uiutils.Text(uiutils.Get(vP, "text")) }
									}
								}
							}
						}
					}
				}
			}
		}
	}
}

templ storeHeroFill1(p StoreHeroProps, vTitle any, vCard any, vImage any, vImageAlt any) {
	@OfferMedia(OfferMediaProps{Alt: uiutils.Cond(uiutils.T(vImageAlt), vImageAlt, vTitle), Image: vImage, Card: vCard})
}

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 store-hero
blocks/store-hero.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/store-hero.json
    The hero of a store: a badge, the heading, a lead, one or two actions and three store promises. The overlay layout puts a picture beside the text with an offer card floating on it; the backdrop layout puts the text over a faint picture. Axes: layout (overlay, backdrop), mediaSide, tone.
    Props (p): id, title, lead, badge, level, actions, perks, card, layout, 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_perks = (p.perks ?? null) -%}
{%- set v_card = (p.card ?? null) -%}
{%- set v_layout = (p.layout ?? 'overlay') -%}
{%- 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) -%}
{%- if og_t(og_eq(v_layout, 'backdrop')) %}
  {%- set c_7 -%}
    {{ include('blocks/backdrop.html.twig', {'p': {'kind': 'image', 'alt': (og_t(v_imageAlt) ? v_imageAlt : v_title), 'image': v_image}}, 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) }}
    {%- if og_t(og_gt(og_len(v_perks), 0)) %}
      {%- set c_6 -%}
        {%- for v_p in og_l(v_perks) %}
          {%- set v_i = loop.index0 -%}
          {%- if og_t(og_lt(v_i, 3)) %}
            {%- set c_5 -%}
              {%- set c_1 -%}
                {{ include('icons/LucideIcon.html.twig', {'name': og_s(og_get(v_p, ['icon'])), 'size': 20}, with_context = false) }}
              {%- endset -%}
              {{ include('compose/Box.html.twig', {'class': 'flex size-10 shrink-0 items-center justify-center rounded bg-muted', 'children': c_1}, with_context = false) }}
              {%- set c_4 -%}
                {%- set c_2 -%}
                  {{ og_text(og_get(v_p, ['title'])) }}
                {%- endset -%}
                {{ include('compose/Text.html.twig', {'size': 'sm', 'weight': 'semibold', 'children': c_2}, with_context = false) }}
                {%- set c_3 -%}
                  {{ og_text(og_get(v_p, ['text'])) }}
                {%- endset -%}
                {{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'text-muted-foreground', 'children': c_3}, with_context = false) }}
              {%- endset -%}
              {{ include('compose/Stack.html.twig', {'gap': '0', 'children': c_4}, with_context = false) }}
            {%- endset -%}
            {{ include('compose/Group.html.twig', {'gap': '4', 'align': 'start', 'attrs': og_attrs(['data-slot', 'perk']), 'children': c_5}, with_context = false) }}
          {%- endif %}
        {%- endfor %}
      {%- endset -%}
      {{ include('compose/Grid.html.twig', {'cols': '1-3', 'class': 'gap-4', 'attrs': og_attrs(['data-slot', 'perks']), 'children': c_6}, with_context = false) }}
    {%- endif %}
  {%- endset -%}
  {{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'heading': {'badge': v_badge, 'level': v_level}, 'tone': v_tone, 'density': 'roomy', 'measure': '3xl', 'className': og_cnv([(og_t(og_eq('image', 'image')) ? 'relative isolate overflow-hidden' : '')]), 'landmarkLabel': v_landmarkLabel}, 'children': og_markup(c_7)}, with_context = false) }}
{%- else %}
  {%- set f_14 -%}
    {{ include('blocks/offer-media.html.twig', {'p': {'alt': (og_t(v_imageAlt) ? v_imageAlt : v_title), 'image': v_image, 'card': v_card}}, with_context = false) }}
  {%- endset -%}
  {%- set c_15 -%}
    {{ 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) }}
    {%- if og_t(og_gt(og_len(v_perks), 0)) %}
      {%- set c_13 -%}
        {%- for v_p in og_l(v_perks) %}
          {%- set v_i = loop.index0 -%}
          {%- if og_t(og_lt(v_i, 3)) %}
            {%- set c_12 -%}
              {%- set c_8 -%}
                {{ include('icons/LucideIcon.html.twig', {'name': og_s(og_get(v_p, ['icon'])), 'size': 20}, with_context = false) }}
              {%- endset -%}
              {{ include('compose/Box.html.twig', {'class': 'flex size-10 shrink-0 items-center justify-center rounded bg-muted', 'children': c_8}, with_context = false) }}
              {%- set c_11 -%}
                {%- set c_9 -%}
                  {{ og_text(og_get(v_p, ['title'])) }}
                {%- endset -%}
                {{ include('compose/Text.html.twig', {'size': 'sm', 'weight': 'semibold', 'children': c_9}, with_context = false) }}
                {%- set c_10 -%}
                  {{ og_text(og_get(v_p, ['text'])) }}
                {%- endset -%}
                {{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'text-muted-foreground', 'children': c_10}, with_context = false) }}
              {%- endset -%}
              {{ include('compose/Stack.html.twig', {'gap': '0', 'children': c_11}, with_context = false) }}
            {%- endset -%}
            {{ include('compose/Group.html.twig', {'gap': '4', 'align': 'start', 'attrs': og_attrs(['data-slot', 'perk']), 'children': c_12}, with_context = false) }}
          {%- endif %}
        {%- endfor %}
      {%- endset -%}
      {{ include('compose/Grid.html.twig', {'cols': '1-3', 'class': 'gap-4', 'attrs': og_attrs(['data-slot', 'perks']), 'children': c_13}, with_context = false) }}
    {%- endif %}
  {%- 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_14)}, 'children': og_markup(c_15)}, with_context = false) }}
{%- endif %}

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 store-hero
blocks/store-hero.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/store-hero.json
    The hero of a store: a badge, the heading, a lead, one or two actions and three store promises. The overlay layout puts a picture beside the text with an offer card floating on it; the backdrop layout puts the text over a faint picture. Axes: layout (overlay, backdrop), mediaSide, tone.
    Props (p): id, title, lead, badge, level, actions, perks, card, layout, 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_perks = ($p['perks'] ?? null)}
{var $v_card = ($p['card'] ?? null)}
{var $v_layout = ($p['layout'] ?? 'overlay')}
{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)}
{if og_t(og_eq($v_layout, 'backdrop'))}
  {capture $c_7}
    {=og_include('blocks/backdrop.latte', ['p' => ['kind' => 'image', 'alt' => (og_t($v_imageAlt) ? $v_imageAlt : $v_title), 'image' => $v_image]])|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}
    {if og_t(og_gt(og_len($v_perks), 0))}
      {capture $c_6}
        {foreach og_l($v_perks) as $v_p}
          {var $v_i = $iterator->counter0}
          {if og_t(og_lt($v_i, 3))}
            {capture $c_5}
              {capture $c_1}
                {=og_include('icons/LucideIcon.latte', ['name' => og_s(og_get($v_p, ['icon'])), 'size' => 20])|noescape}
              {/capture}
              {=og_include('compose/Box.latte', ['class' => 'flex size-10 shrink-0 items-center justify-center rounded bg-muted', 'children' => (string) $c_1])|noescape}
              {capture $c_4}
                {capture $c_2}
                  {=og_text(og_get($v_p, ['title']))}
                {/capture}
                {=og_include('compose/Text.latte', ['size' => 'sm', 'weight' => 'semibold', 'children' => (string) $c_2])|noescape}
                {capture $c_3}
                  {=og_text(og_get($v_p, ['text']))}
                {/capture}
                {=og_include('compose/Text.latte', ['size' => 'xs', 'class' => 'text-muted-foreground', 'children' => (string) $c_3])|noescape}
              {/capture}
              {=og_include('compose/Stack.latte', ['gap' => '0', 'children' => (string) $c_4])|noescape}
            {/capture}
            {=og_include('compose/Group.latte', ['gap' => '4', 'align' => 'start', 'attrs' => og_attrs(['data-slot', 'perk']), 'children' => (string) $c_5])|noescape}
          {/if}
        {/foreach}
      {/capture}
      {=og_include('compose/Grid.latte', ['cols' => '1-3', 'class' => 'gap-4', 'attrs' => og_attrs(['data-slot', 'perks']), 'children' => (string) $c_6])|noescape}
    {/if}
  {/capture}
  {=og_include('blocks/section-frame.latte', ['p' => ['id' => $v_id, 'title' => $v_title, 'lead' => $v_lead, 'heading' => ['badge' => $v_badge, 'level' => $v_level], 'tone' => $v_tone, 'density' => 'roomy', 'measure' => '3xl', 'className' => og_cnv([(og_t(og_eq('image', 'image')) ? 'relative isolate overflow-hidden' : '')]), 'landmarkLabel' => $v_landmarkLabel], 'children' => og_markup($c_7)])|noescape}
{else}
  {capture $f_14}
    {=og_include('blocks/offer-media.latte', ['p' => ['alt' => (og_t($v_imageAlt) ? $v_imageAlt : $v_title), 'image' => $v_image, 'card' => $v_card]])|noescape}
  {/capture}
  {capture $c_15}
    {=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}
    {if og_t(og_gt(og_len($v_perks), 0))}
      {capture $c_13}
        {foreach og_l($v_perks) as $v_p}
          {var $v_i = $iterator->counter0}
          {if og_t(og_lt($v_i, 3))}
            {capture $c_12}
              {capture $c_8}
                {=og_include('icons/LucideIcon.latte', ['name' => og_s(og_get($v_p, ['icon'])), 'size' => 20])|noescape}
              {/capture}
              {=og_include('compose/Box.latte', ['class' => 'flex size-10 shrink-0 items-center justify-center rounded bg-muted', 'children' => (string) $c_8])|noescape}
              {capture $c_11}
                {capture $c_9}
                  {=og_text(og_get($v_p, ['title']))}
                {/capture}
                {=og_include('compose/Text.latte', ['size' => 'sm', 'weight' => 'semibold', 'children' => (string) $c_9])|noescape}
                {capture $c_10}
                  {=og_text(og_get($v_p, ['text']))}
                {/capture}
                {=og_include('compose/Text.latte', ['size' => 'xs', 'class' => 'text-muted-foreground', 'children' => (string) $c_10])|noescape}
              {/capture}
              {=og_include('compose/Stack.latte', ['gap' => '0', 'children' => (string) $c_11])|noescape}
            {/capture}
            {=og_include('compose/Group.latte', ['gap' => '4', 'align' => 'start', 'attrs' => og_attrs(['data-slot', 'perk']), 'children' => (string) $c_12])|noescape}
          {/if}
        {/foreach}
      {/capture}
      {=og_include('compose/Grid.latte', ['cols' => '1-3', 'class' => 'gap-4', 'attrs' => og_attrs(['data-slot', 'perks']), 'children' => (string) $c_13])|noescape}
    {/if}
  {/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_14)], 'children' => og_markup($c_15)])|noescape}
{/if}

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 store-hero
blocks/store-hero.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/store-hero.json
    The hero of a store: a badge, the heading, a lead, one or two actions and three store promises. The overlay layout puts a picture beside the text with an offer card floating on it; the backdrop layout puts the text over a faint picture. Axes: layout (overlay, backdrop), mediaSide, tone.
    Props (p): id, title, lead, badge, level, actions, perks, card, layout, 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_perks = og_def(p['perks'], none) -%}
{%- set v_card = og_def(p['card'], none) -%}
{%- set v_layout = og_def(p['layout'], 'overlay') -%}
{%- 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) -%}
{%- if og_t(og_eq(v_layout, 'backdrop')) %}
  {%- set c_7 -%}
    {{ og_include('blocks/backdrop.html.j2', {'p': {'kind': 'image', 'alt': (v_imageAlt if og_t(v_imageAlt) else v_title), 'image': v_image}}) }}
    {{ 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'])}}) }}
    {%- if og_t(og_gt(og_len(v_perks), 0)) %}
      {%- set c_6 -%}
        {%- for v_p in og_l(v_perks) %}
          {%- set v_i = loop.index0 -%}
          {%- if og_t(og_lt(v_i, 3)) %}
            {%- set c_5 -%}
              {%- set c_1 -%}
                {{ og_include('icons/lucide-icon.html.j2', {'p': {'Name': og_s(og_get(v_p, ['icon'])), 'Size': 20}}) }}
              {%- endset -%}
              {{ og_include('compose/box.html.j2', {'p': {'Class': 'flex size-10 shrink-0 items-center justify-center rounded bg-muted'}, 'children': c_1}) }}
              {%- set c_4 -%}
                {%- set c_2 -%}
                  {{ og_text(og_get(v_p, ['title'])) }}
                {%- endset -%}
                {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_2}) }}
                {%- set c_3 -%}
                  {{ og_text(og_get(v_p, ['text'])) }}
                {%- endset -%}
                {{ og_include('compose/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_3}) }}
              {%- endset -%}
              {{ og_include('compose/stack.html.j2', {'p': {'Gap': '0'}, 'children': c_4}) }}
            {%- endset -%}
            {{ og_include('compose/group.html.j2', {'p': {'Gap': '4', 'Align': 'start', 'Attrs': og_attrs(['data-slot', 'perk'])}, 'children': c_5}) }}
          {%- endif %}
        {%- endfor %}
      {%- endset -%}
      {{ og_include('compose/grid.html.j2', {'p': {'Cols': '1-3', 'Class': 'gap-4', 'Attrs': og_attrs(['data-slot', 'perks'])}, 'children': c_6}) }}
    {%- endif %}
  {%- 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}, 'tone': v_tone, 'density': 'roomy', 'measure': '3xl', 'className': og_cnv([('relative isolate overflow-hidden' if og_t(og_eq('image', 'image')) else '')]), 'landmarkLabel': v_landmarkLabel}, 'children': og_markup(c_7)}) }}
{%- else %}
  {%- set f_14 -%}
    {{ og_include('blocks/offer-media.html.j2', {'p': {'alt': (v_imageAlt if og_t(v_imageAlt) else v_title), 'image': v_image, 'card': v_card}}) }}
  {%- endset -%}
  {%- set c_15 -%}
    {{ 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'])}}) }}
    {%- if og_t(og_gt(og_len(v_perks), 0)) %}
      {%- set c_13 -%}
        {%- for v_p in og_l(v_perks) %}
          {%- set v_i = loop.index0 -%}
          {%- if og_t(og_lt(v_i, 3)) %}
            {%- set c_12 -%}
              {%- set c_8 -%}
                {{ og_include('icons/lucide-icon.html.j2', {'p': {'Name': og_s(og_get(v_p, ['icon'])), 'Size': 20}}) }}
              {%- endset -%}
              {{ og_include('compose/box.html.j2', {'p': {'Class': 'flex size-10 shrink-0 items-center justify-center rounded bg-muted'}, 'children': c_8}) }}
              {%- set c_11 -%}
                {%- set c_9 -%}
                  {{ og_text(og_get(v_p, ['title'])) }}
                {%- endset -%}
                {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_9}) }}
                {%- set c_10 -%}
                  {{ og_text(og_get(v_p, ['text'])) }}
                {%- endset -%}
                {{ og_include('compose/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_10}) }}
              {%- endset -%}
              {{ og_include('compose/stack.html.j2', {'p': {'Gap': '0'}, 'children': c_11}) }}
            {%- endset -%}
            {{ og_include('compose/group.html.j2', {'p': {'Gap': '4', 'Align': 'start', 'Attrs': og_attrs(['data-slot', 'perk'])}, 'children': c_12}) }}
          {%- endif %}
        {%- endfor %}
      {%- endset -%}
      {{ og_include('compose/grid.html.j2', {'p': {'Cols': '1-3', 'Class': 'gap-4', 'Attrs': og_attrs(['data-slot', 'perks'])}, 'children': c_13}) }}
    {%- endif %}
  {%- 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_14)}, 'children': og_markup(c_15)}) }}
{%- endif %}

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.

The hero of a store: a badge, the heading, a lead, one or two actions and three store promises. The overlay layout puts a picture beside the text with an offer card floating on it; the backdrop layout puts the text over a faint picture. Axes: layout (overlay, backdrop), mediaSide, tone.

Props of StoreHero
PropTypeDefault Description
id (required)string-
title (required)string-
lead string""
badge string""a short pill above the heading
level 1 | 21
actions (required)LinkActions-
perks (required)Feature[]-store promises under the actions (the first three are shown)
card (required)OfferCard-the offer card on the picture (overlay layout)
layout "overlay" | "backdrop""overlay"
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