Hero Split Extras
Hero Split Extras component
Install
npx ui8kit add hero-split-extrasPulls in: box, compose, figure-block, group, hero-split, kit-box, kit-text, lucide-icon, media-frame, stack, text, utils
Preview
We moved our marketing site in a week and the pages got faster.
Mara Quinn
Head of Growth
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-cdnnpx ui8kit add hero-split-extras<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->
<!--
What HeroSplit shows under the lead: three figures in cards, a row of faces with a proof line, two small
feature cards, or a quote with its author over three figures.
-->
<script lang="ts" module>
import type { Snippet } from "svelte";
import type { HeroContent } from "../blocks/hero-split.types";
export type HeroSplitExtrasProps = {
content: HeroContent;
extra?: "stats" | "avatars" | "minis" | "quote" | "none";
};
</script>
<script lang="ts">
import Box from "../compose/Box.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 FigureBlock from "../components/figure-block.svelte";
import MediaFrame from "../components/media-frame.svelte";
let { content, extra = "none" }: HeroSplitExtrasProps = $props();
</script>
{#if (((extra as string) === "stats") && ((content.stats?.length ?? 0) > 0))}
<Box class="grid grid-cols-3 gap-4" data-slot="hero-stats">
{#each content.stats as s, i (s.id)}
{#if (i < 3)}
<Stack gap="0" class="rounded bg-card inset-ring inset-ring-border p-4" data-slot="hero-stat">
<Text size="2xl" weight="semibold">
{s.value}
</Text>
<Text size="xs" class="text-muted-foreground">
{s.label}
</Text>
</Stack>
{/if}
{/each}
</Box>
{/if}
{#if (((extra as string) === "avatars") && ((content.people?.length ?? 0) > 0))}
<Group gap="4" align="center" class="flex-wrap" data-slot="hero-proof">
<Group gap="2" align="center">
{#each content.people as p, i (p.id)}
{#if (i < 4)}
<MediaFrame alt={p.author} src={p.image} ratio="1/1" class="size-10 shrink-0 rounded-full" />
{/if}
{/each}
</Group>
<Text size="sm" class="text-muted-foreground">
{content.proof}
</Text>
</Group>
{/if}
{#if (((extra as string) === "minis") && ((content.features?.length ?? 0) > 0))}
<Box class="grid grid-cols-1 gap-4 sm:grid-cols-2" data-slot="hero-minis">
{#each content.features as f, i (f.id)}
{#if (i < 2)}
<Group gap="4" align="start" class="rounded bg-card inset-ring inset-ring-border p-4" data-slot="hero-mini">
<Box class="flex size-10 shrink-0 items-center justify-center rounded bg-muted">
<LucideIcon name={f.icon} size={20} />
</Box>
<Stack gap="0">
<Text size="sm" weight="semibold">
{f.title}
</Text>
<Text size="xs" class="text-muted-foreground">
{f.text}
</Text>
</Stack>
</Group>
{/if}
{/each}
</Box>
{/if}
{#if (((extra as string) === "quote") && ((content.people?.length ?? 0) > 0))}
<Stack gap="6" align="stretch" data-slot="hero-split-extras">
{#each content.people as p, i (p.id)}
{#if (i < 1)}
<FigureBlock class="flex flex-col gap-4" testid="hero-quote">
<Text tag="blockquote" class="text-lg font-medium">
{p.quote}
</Text>
<Group gap="4" align="center">
<MediaFrame alt={p.author} src={p.image} ratio="1/1" class="size-10 shrink-0 rounded-full" />
<Stack gap="0">
<Text size="sm" weight="semibold">
{p.author}
</Text>
<Text size="xs" class="text-muted-foreground">
{p.role}
</Text>
</Stack>
</Group>
</FigureBlock>
{/if}
{/each}
<Box class="grid grid-cols-3 gap-4" data-slot="hero-stats">
{#each content.stats as s, i (s.id)}
{#if (i < 3)}
<Stack gap="0" class="rounded bg-card inset-ring inset-ring-border p-4" data-slot="hero-stat">
<Text size="2xl" weight="semibold">
{s.value}
</Text>
<Text size="xs" class="text-muted-foreground">
{s.label}
</Text>
</Stack>
{/if}
{/each}
</Box>
</Stack>
{/if}
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-cdnnpx ui8kit add hero-split-extras// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
/**
* What HeroSplit shows under the lead: three figures in cards, a row of faces with a proof line, two small
* feature cards, or a quote with its author over three figures.
*/
import { Fragment, type ReactNode } from "react";
import { Box, Group, Stack, Text } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import { FigureBlock } from "../components/figure-block";
import { MediaFrame } from "../components/media-frame";
import type { HeroContent } from "../blocks/hero-split.types";
export type HeroSplitExtrasProps = {
content: HeroContent;
extra?: "stats" | "avatars" | "minis" | "quote" | "none";
};
export function HeroSplitExtras({ content, extra = "none" }: HeroSplitExtrasProps) {
return (
<>
{(((extra as string) === "stats") && ((content.stats?.length ?? 0) > 0)) ? (
<Box className="grid grid-cols-3 gap-4" data-slot="hero-stats">
{(content.stats ?? []).map((s, i) => (
<Fragment key={s.id}>
{(i < 3) ? (
<Stack gap="0" className="rounded bg-card inset-ring inset-ring-border p-4" data-slot="hero-stat">
<Text size="2xl" weight="semibold">
{s.value}
</Text>
<Text size="xs" className="text-muted-foreground">
{s.label}
</Text>
</Stack>
) : null}
</Fragment>
))}
</Box>
) : null}
{(((extra as string) === "avatars") && ((content.people?.length ?? 0) > 0)) ? (
<Group gap="4" align="center" className="flex-wrap" data-slot="hero-proof">
<Group gap="2" align="center">
{(content.people ?? []).map((p, i) => (
<Fragment key={p.id}>
{(i < 4) ? (
<MediaFrame alt={p.author} src={p.image} ratio="1/1" className="size-10 shrink-0 rounded-full" />
) : null}
</Fragment>
))}
</Group>
<Text size="sm" className="text-muted-foreground">
{content.proof}
</Text>
</Group>
) : null}
{(((extra as string) === "minis") && ((content.features?.length ?? 0) > 0)) ? (
<Box className="grid grid-cols-1 gap-4 sm:grid-cols-2" data-slot="hero-minis">
{(content.features ?? []).map((f, i) => (
<Fragment key={f.id}>
{(i < 2) ? (
<Group gap="4" align="start" className="rounded bg-card inset-ring inset-ring-border p-4" data-slot="hero-mini">
<Box className="flex size-10 shrink-0 items-center justify-center rounded bg-muted">
<LucideIcon name={f.icon} size={20} />
</Box>
<Stack gap="0">
<Text size="sm" weight="semibold">
{f.title}
</Text>
<Text size="xs" className="text-muted-foreground">
{f.text}
</Text>
</Stack>
</Group>
) : null}
</Fragment>
))}
</Box>
) : null}
{(((extra as string) === "quote") && ((content.people?.length ?? 0) > 0)) ? (
<Stack gap="6" align="stretch" data-slot="hero-split-extras">
{(content.people ?? []).map((p, i) => (
<Fragment key={p.id}>
{(i < 1) ? (
<FigureBlock className="flex flex-col gap-4" testid="hero-quote">
<Text tag="blockquote" className="text-lg font-medium">
{p.quote}
</Text>
<Group gap="4" align="center">
<MediaFrame alt={p.author} src={p.image} ratio="1/1" className="size-10 shrink-0 rounded-full" />
<Stack gap="0">
<Text size="sm" weight="semibold">
{p.author}
</Text>
<Text size="xs" className="text-muted-foreground">
{p.role}
</Text>
</Stack>
</Group>
</FigureBlock>
) : null}
</Fragment>
))}
<Box className="grid grid-cols-3 gap-4" data-slot="hero-stats">
{(content.stats ?? []).map((s, i) => (
<Fragment key={s.id}>
{(i < 3) ? (
<Stack gap="0" className="rounded bg-card inset-ring inset-ring-border p-4" data-slot="hero-stat">
<Text size="2xl" weight="semibold">
{s.value}
</Text>
<Text size="xs" className="text-muted-foreground">
{s.label}
</Text>
</Stack>
) : null}
</Fragment>
))}
</Box>
</Stack>
) : null}
</>
);
}
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-cdnnpx ui8kit add hero-split-extras<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->
<!--
What HeroSplit shows under the lead: three figures in cards, a row of faces with a proof line, two small
feature cards, or a quote with its author over three figures.
-->
<script lang="ts">
import type { HeroContent } from "../blocks/hero-split.types";
export type HeroSplitExtrasProps = {
content: HeroContent;
extra?: "stats" | "avatars" | "minis" | "quote" | "none";
};
</script>
<script setup lang="ts">
import Box from "../compose/Box.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 FigureBlock from "../components/figure-block.vue";
import MediaFrame from "../components/media-frame.vue";
const { content, extra = "none" } = defineProps<HeroSplitExtrasProps>();
</script>
<template>
<Box
v-if="(((extra as string) === 'stats') && ((content.stats?.length ?? 0) > 0))"
class="grid grid-cols-3 gap-4"
data-slot="hero-stats"
>
<template v-for="(s, i) in content.stats" :key="s.id">
<Stack v-if="(i < 3)" gap="0" class="rounded bg-card inset-ring inset-ring-border p-4" data-slot="hero-stat">
<Text size="2xl" weight="semibold">
{{ s.value }}
</Text>
<Text size="xs" class="text-muted-foreground">
{{ s.label }}
</Text>
</Stack>
</template>
</Box>
<Group
v-if="(((extra as string) === 'avatars') && ((content.people?.length ?? 0) > 0))"
gap="4"
align="center"
class="flex-wrap"
data-slot="hero-proof"
>
<Group gap="2" align="center">
<template v-for="(p, i) in content.people" :key="p.id">
<MediaFrame v-if="(i < 4)" :alt="p.author" :src="p.image" ratio="1/1" class="size-10 shrink-0 rounded-full" />
</template>
</Group>
<Text size="sm" class="text-muted-foreground">
{{ content.proof }}
</Text>
</Group>
<Box
v-if="(((extra as string) === 'minis') && ((content.features?.length ?? 0) > 0))"
class="grid grid-cols-1 gap-4 sm:grid-cols-2"
data-slot="hero-minis"
>
<template v-for="(f, i) in content.features" :key="f.id">
<Group
v-if="(i < 2)"
gap="4"
align="start"
class="rounded bg-card inset-ring inset-ring-border p-4"
data-slot="hero-mini"
>
<Box class="flex size-10 shrink-0 items-center justify-center rounded bg-muted">
<LucideIcon :name="f.icon" :size="20" />
</Box>
<Stack gap="0">
<Text size="sm" weight="semibold">
{{ f.title }}
</Text>
<Text size="xs" class="text-muted-foreground">
{{ f.text }}
</Text>
</Stack>
</Group>
</template>
</Box>
<Stack
v-if="(((extra as string) === 'quote') && ((content.people?.length ?? 0) > 0))"
gap="6"
align="stretch"
data-slot="hero-split-extras"
>
<template v-for="(p, i) in content.people" :key="p.id">
<FigureBlock v-if="(i < 1)" class="flex flex-col gap-4" testid="hero-quote">
<Text tag="blockquote" class="text-lg font-medium">
{{ p.quote }}
</Text>
<Group gap="4" align="center">
<MediaFrame :alt="p.author" :src="p.image" ratio="1/1" class="size-10 shrink-0 rounded-full" />
<Stack gap="0">
<Text size="sm" weight="semibold">
{{ p.author }}
</Text>
<Text size="xs" class="text-muted-foreground">
{{ p.role }}
</Text>
</Stack>
</Group>
</FigureBlock>
</template>
<Box class="grid grid-cols-3 gap-4" data-slot="hero-stats">
<template v-for="(s, i) in content.stats" :key="s.id">
<Stack v-if="(i < 3)" gap="0" class="rounded bg-card inset-ring inset-ring-border p-4" data-slot="hero-stat">
<Text size="2xl" weight="semibold">
{{ s.value }}
</Text>
<Text size="xs" class="text-muted-foreground">
{{ s.label }}
</Text>
</Stack>
</template>
</Box>
</Stack>
</template>
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-cdnnpx ui8kit add hero-split-extras// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
/**
* What HeroSplit shows under the lead: three figures in cards, a row of faces with a proof line, two small
* feature cards, or a quote with its author over three figures.
*/
import { For, type JSX } from "solid-js";
import { Box, Group, Stack, Text } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import { FigureBlock } from "../components/figure-block";
import { MediaFrame } from "../components/media-frame";
import type { HeroContent } from "../blocks/hero-split.types";
export type HeroSplitExtrasProps = {
content: HeroContent;
extra?: "stats" | "avatars" | "minis" | "quote" | "none";
};
export function HeroSplitExtras({ content, extra = "none" }: HeroSplitExtrasProps) {
return (
<>
{(((extra as string) === "stats") && ((content.stats?.length ?? 0) > 0)) ? (
<Box class="grid grid-cols-3 gap-4" data-slot="hero-stats">
<For each={content.stats ?? []}>{(s, iOf) => { const i = iOf(); return (
<>
{(i < 3) ? (
<Stack gap="0" class="rounded bg-card inset-ring inset-ring-border p-4" data-slot="hero-stat">
<Text size="2xl" weight="semibold">
{s.value}
</Text>
<Text size="xs" class="text-muted-foreground">
{s.label}
</Text>
</Stack>
) : null}
</>
); }}</For>
</Box>
) : null}
{(((extra as string) === "avatars") && ((content.people?.length ?? 0) > 0)) ? (
<Group gap="4" align="center" class="flex-wrap" data-slot="hero-proof">
<Group gap="2" align="center">
<For each={content.people ?? []}>{(p, iOf) => { const i = iOf(); return (
<>
{(i < 4) ? (
<MediaFrame alt={p.author} src={p.image} ratio="1/1" class="size-10 shrink-0 rounded-full" />
) : null}
</>
); }}</For>
</Group>
<Text size="sm" class="text-muted-foreground">
{content.proof}
</Text>
</Group>
) : null}
{(((extra as string) === "minis") && ((content.features?.length ?? 0) > 0)) ? (
<Box class="grid grid-cols-1 gap-4 sm:grid-cols-2" data-slot="hero-minis">
<For each={content.features ?? []}>{(f, iOf) => { const i = iOf(); return (
<>
{(i < 2) ? (
<Group gap="4" align="start" class="rounded bg-card inset-ring inset-ring-border p-4" data-slot="hero-mini">
<Box class="flex size-10 shrink-0 items-center justify-center rounded bg-muted">
<LucideIcon name={f.icon} size={20} />
</Box>
<Stack gap="0">
<Text size="sm" weight="semibold">
{f.title}
</Text>
<Text size="xs" class="text-muted-foreground">
{f.text}
</Text>
</Stack>
</Group>
) : null}
</>
); }}</For>
</Box>
) : null}
{(((extra as string) === "quote") && ((content.people?.length ?? 0) > 0)) ? (
<Stack gap="6" align="stretch" data-slot="hero-split-extras">
<For each={content.people ?? []}>{(p, iOf) => { const i = iOf(); return (
<>
{(i < 1) ? (
<FigureBlock class="flex flex-col gap-4" testid="hero-quote">
<Text tag="blockquote" class="text-lg font-medium">
{p.quote}
</Text>
<Group gap="4" align="center">
<MediaFrame alt={p.author} src={p.image} ratio="1/1" class="size-10 shrink-0 rounded-full" />
<Stack gap="0">
<Text size="sm" weight="semibold">
{p.author}
</Text>
<Text size="xs" class="text-muted-foreground">
{p.role}
</Text>
</Stack>
</Group>
</FigureBlock>
) : null}
</>
); }}</For>
<Box class="grid grid-cols-3 gap-4" data-slot="hero-stats">
<For each={content.stats ?? []}>{(s, iOf) => { const i = iOf(); return (
<>
{(i < 3) ? (
<Stack gap="0" class="rounded bg-card inset-ring inset-ring-border p-4" data-slot="hero-stat">
<Text size="2xl" weight="semibold">
{s.value}
</Text>
<Text size="xs" class="text-muted-foreground">
{s.label}
</Text>
</Stack>
) : null}
</>
); }}</For>
</Box>
</Stack>
) : null}
</>
);
}
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-cdnnpx ui8kit add hero-split-extras// 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-extras.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"
)
// HeroSplitExtrasProps are the props of HeroSplitExtras; the values are the JSON shapes of the TypeScript props.
type HeroSplitExtrasProps struct {
Content any `json:"content"`
Extra any `json:"extra"`
}
// What HeroSplit shows under the lead: three figures in cards, a row of faces with a proof line, two small feature cards, or a quote with its author over three figures.
templ HeroSplitExtras(p HeroSplitExtrasProps) {
{{ vContent := p.Content }}
{{ vExtra := uiutils.Def(p.Extra, "none") }}
if uiutils.T(uiutils.And(uiutils.Eq(vExtra, "stats"), uiutils.Gt(uiutils.Len(uiutils.Get(vContent, "stats")), float64(0)))) {
@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: "grid grid-cols-3 gap-4", Attrs: uiutils.Attrs("data-slot", "hero-stats")}}) {
for vI, vS := range uiutils.L(uiutils.Get(vContent, "stats")) {
if uiutils.Lt(float64(vI), float64(3)) {
@compose.Stack(compose.StackProps{Gap: "0", BoxProps: box.BoxProps{Class: "rounded bg-card inset-ring inset-ring-border p-4", Attrs: uiutils.Attrs("data-slot", "hero-stat")}}) {
@compose.Text(compose.TextProps{Size: "2xl", Weight: "semibold", TextProps: text.TextProps{}}) {
{ uiutils.Text(uiutils.Get(vS, "value")) }
}
@compose.Text(compose.TextProps{Size: "xs", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
{ uiutils.Text(uiutils.Get(vS, "label")) }
}
}
}
}
}
}
if uiutils.T(uiutils.And(uiutils.Eq(vExtra, "avatars"), uiutils.Gt(uiutils.Len(uiutils.Get(vContent, "people")), float64(0)))) {
@compose.Group(compose.GroupProps{Gap: "4", Align: "center", BoxProps: box.BoxProps{Class: "flex-wrap", Attrs: uiutils.Attrs("data-slot", "hero-proof")}}) {
@compose.Group(compose.GroupProps{Gap: "2", Align: "center", BoxProps: box.BoxProps{}}) {
for vI, vP := range uiutils.L(uiutils.Get(vContent, "people")) {
if uiutils.Lt(float64(vI), float64(4)) {
@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vP, "author"), Src: uiutils.Get(vP, "image"), Ratio: "1/1", Class: uiutils.Cnv("size-10 shrink-0 rounded-full")})
}
}
}
@compose.Text(compose.TextProps{Size: "sm", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
{ uiutils.Text(uiutils.Get(vContent, "proof")) }
}
}
}
if uiutils.T(uiutils.And(uiutils.Eq(vExtra, "minis"), uiutils.Gt(uiutils.Len(uiutils.Get(vContent, "features")), float64(0)))) {
@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: "grid grid-cols-1 gap-4 sm:grid-cols-2", Attrs: uiutils.Attrs("data-slot", "hero-minis")}}) {
for vI, vF := range uiutils.L(uiutils.Get(vContent, "features")) {
if uiutils.Lt(float64(vI), float64(2)) {
@compose.Group(compose.GroupProps{Gap: "4", Align: "start", BoxProps: box.BoxProps{Class: "rounded bg-card inset-ring inset-ring-border p-4", Attrs: uiutils.Attrs("data-slot", "hero-mini")}}) {
@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(vF, "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(vF, "title")) }
}
@compose.Text(compose.TextProps{Size: "xs", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
{ uiutils.Text(uiutils.Get(vF, "text")) }
}
}
}
}
}
}
}
if uiutils.T(uiutils.And(uiutils.Eq(vExtra, "quote"), uiutils.Gt(uiutils.Len(uiutils.Get(vContent, "people")), float64(0)))) {
@compose.Stack(compose.StackProps{Gap: "6", Align: "stretch", BoxProps: box.BoxProps{Attrs: uiutils.Attrs("data-slot", "hero-split-extras")}}) {
for vI, vP := range uiutils.L(uiutils.Get(vContent, "people")) {
if uiutils.Lt(float64(vI), float64(1)) {
@FigureBlock(FigureBlockProps{Class: uiutils.Cnv("flex flex-col gap-4"), Testid: "hero-quote"}) {
@compose.Text(compose.TextProps{TextProps: text.TextProps{Tag: "blockquote", Class: "text-lg font-medium"}}) {
{ uiutils.Text(uiutils.Get(vP, "quote")) }
}
@compose.Group(compose.GroupProps{Gap: "4", Align: "center", BoxProps: box.BoxProps{}}) {
@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vP, "author"), Src: uiutils.Get(vP, "image"), Ratio: "1/1", Class: uiutils.Cnv("size-10 shrink-0 rounded-full")})
@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, "author")) }
}
@compose.Text(compose.TextProps{Size: "xs", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
{ uiutils.Text(uiutils.Get(vP, "role")) }
}
}
}
}
}
}
@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: "grid grid-cols-3 gap-4", Attrs: uiutils.Attrs("data-slot", "hero-stats")}}) {
for vI, vS := range uiutils.L(uiutils.Get(vContent, "stats")) {
if uiutils.Lt(float64(vI), float64(3)) {
@compose.Stack(compose.StackProps{Gap: "0", BoxProps: box.BoxProps{Class: "rounded bg-card inset-ring inset-ring-border p-4", Attrs: uiutils.Attrs("data-slot", "hero-stat")}}) {
@compose.Text(compose.TextProps{Size: "2xl", Weight: "semibold", TextProps: text.TextProps{}}) {
{ uiutils.Text(uiutils.Get(vS, "value")) }
}
@compose.Text(compose.TextProps{Size: "xs", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
{ uiutils.Text(uiutils.Get(vS, "label")) }
}
}
}
}
}
}
}
}
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-cdnnpx ui8kit add hero-split-extras{#- 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-extras.json
What HeroSplit shows under the lead: three figures in cards, a row of faces with a proof line, two small feature cards, or a quote with its author over three figures.
Props (p): content, extra. -#}
{%- set v_content = (p.content ?? null) -%}
{%- set v_extra = (p.extra ?? 'none') -%}
{%- if og_t(og_and([og_eq(v_extra, 'stats'), og_gt(og_len(og_get(v_content, ['stats'])), 0)])) %}
{%- set c_4 -%}
{%- for v_s in og_l(og_get(v_content, ['stats'])) %}
{%- set v_i = loop.index0 -%}
{%- if og_t(og_lt(v_i, 3)) %}
{%- set c_3 -%}
{%- set c_1 -%}
{{ og_text(og_get(v_s, ['value'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': '2xl', 'weight': 'semibold', 'children': c_1}, with_context = false) }}
{%- set c_2 -%}
{{ og_text(og_get(v_s, ['label'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'text-muted-foreground', 'children': c_2}, with_context = false) }}
{%- endset -%}
{{ include('compose/Stack.html.twig', {'gap': '0', 'class': 'rounded bg-card inset-ring inset-ring-border p-4', 'attrs': og_attrs(['data-slot', 'hero-stat']), 'children': c_3}, with_context = false) }}
{%- endif %}
{%- endfor %}
{%- endset -%}
{{ include('compose/Box.html.twig', {'class': 'grid grid-cols-3 gap-4', 'attrs': og_attrs(['data-slot', 'hero-stats']), 'children': c_4}, with_context = false) }}
{%- endif %}
{%- if og_t(og_and([og_eq(v_extra, 'avatars'), og_gt(og_len(og_get(v_content, ['people'])), 0)])) %}
{%- set c_7 -%}
{%- set c_5 -%}
{%- for v_p in og_l(og_get(v_content, ['people'])) %}
{%- set v_i = loop.index0 -%}
{%- if og_t(og_lt(v_i, 4)) %}
{{ include('blocks/media-frame.html.twig', {'p': {'alt': og_get(v_p, ['author']), 'src': og_get(v_p, ['image']), 'ratio': '1/1', 'className': og_cnv(['size-10 shrink-0 rounded-full'])}}, with_context = false) }}
{%- endif %}
{%- endfor %}
{%- endset -%}
{{ include('compose/Group.html.twig', {'gap': '2', 'align': 'center', 'children': c_5}, with_context = false) }}
{%- set c_6 -%}
{{ og_text(og_get(v_content, ['proof'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': 'sm', 'class': 'text-muted-foreground', 'children': c_6}, with_context = false) }}
{%- endset -%}
{{ include('compose/Group.html.twig', {'gap': '4', 'align': 'center', 'class': 'flex-wrap', 'attrs': og_attrs(['data-slot', 'hero-proof']), 'children': c_7}, with_context = false) }}
{%- endif %}
{%- if og_t(og_and([og_eq(v_extra, 'minis'), og_gt(og_len(og_get(v_content, ['features'])), 0)])) %}
{%- set c_13 -%}
{%- for v_f in og_l(og_get(v_content, ['features'])) %}
{%- set v_i = loop.index0 -%}
{%- if og_t(og_lt(v_i, 2)) %}
{%- set c_12 -%}
{%- set c_8 -%}
{{ include('icons/LucideIcon.html.twig', {'name': og_s(og_get(v_f, ['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_f, ['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_f, ['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', 'class': 'rounded bg-card inset-ring inset-ring-border p-4', 'attrs': og_attrs(['data-slot', 'hero-mini']), 'children': c_12}, with_context = false) }}
{%- endif %}
{%- endfor %}
{%- endset -%}
{{ include('compose/Box.html.twig', {'class': 'grid grid-cols-1 gap-4 sm:grid-cols-2', 'attrs': og_attrs(['data-slot', 'hero-minis']), 'children': c_13}, with_context = false) }}
{%- endif %}
{%- if og_t(og_and([og_eq(v_extra, 'quote'), og_gt(og_len(og_get(v_content, ['people'])), 0)])) %}
{%- set c_24 -%}
{%- for v_p in og_l(og_get(v_content, ['people'])) %}
{%- set v_i = loop.index0 -%}
{%- if og_t(og_lt(v_i, 1)) %}
{%- set c_19 -%}
{%- set c_14 -%}
{{ og_text(og_get(v_p, ['quote'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'tag': 'blockquote', 'class': 'text-lg font-medium', 'children': c_14}, with_context = false) }}
{%- set c_18 -%}
{{ include('blocks/media-frame.html.twig', {'p': {'alt': og_get(v_p, ['author']), 'src': og_get(v_p, ['image']), 'ratio': '1/1', 'className': og_cnv(['size-10 shrink-0 rounded-full'])}}, with_context = false) }}
{%- set c_17 -%}
{%- set c_15 -%}
{{ og_text(og_get(v_p, ['author'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': 'sm', 'weight': 'semibold', 'children': c_15}, with_context = false) }}
{%- set c_16 -%}
{{ og_text(og_get(v_p, ['role'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'text-muted-foreground', 'children': c_16}, with_context = false) }}
{%- endset -%}
{{ include('compose/Stack.html.twig', {'gap': '0', 'children': c_17}, with_context = false) }}
{%- endset -%}
{{ include('compose/Group.html.twig', {'gap': '4', 'align': 'center', 'children': c_18}, with_context = false) }}
{%- endset -%}
{{ include('blocks/figure-block.html.twig', {'p': {'className': og_cnv(['flex flex-col gap-4']), 'testid': 'hero-quote'}, 'children': og_markup(c_19)}, with_context = false) }}
{%- endif %}
{%- endfor %}
{%- set c_23 -%}
{%- for v_s in og_l(og_get(v_content, ['stats'])) %}
{%- set v_i = loop.index0 -%}
{%- if og_t(og_lt(v_i, 3)) %}
{%- set c_22 -%}
{%- set c_20 -%}
{{ og_text(og_get(v_s, ['value'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': '2xl', 'weight': 'semibold', 'children': c_20}, with_context = false) }}
{%- set c_21 -%}
{{ og_text(og_get(v_s, ['label'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'text-muted-foreground', 'children': c_21}, with_context = false) }}
{%- endset -%}
{{ include('compose/Stack.html.twig', {'gap': '0', 'class': 'rounded bg-card inset-ring inset-ring-border p-4', 'attrs': og_attrs(['data-slot', 'hero-stat']), 'children': c_22}, with_context = false) }}
{%- endif %}
{%- endfor %}
{%- endset -%}
{{ include('compose/Box.html.twig', {'class': 'grid grid-cols-3 gap-4', 'attrs': og_attrs(['data-slot', 'hero-stats']), 'children': c_23}, with_context = false) }}
{%- endset -%}
{{ include('compose/Stack.html.twig', {'gap': '6', 'align': 'stretch', 'attrs': og_attrs(['data-slot', 'hero-split-extras']), 'children': c_24}, with_context = false) }}
{%- endif %}
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-cdnnpx ui8kit add hero-split-extras{* 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-extras.json
What HeroSplit shows under the lead: three figures in cards, a row of faces with a proof line, two small feature cards, or a quote with its author over three figures.
Props (p): content, extra. *}
{var $v_content = ($p['content'] ?? null)}
{var $v_extra = ($p['extra'] ?? 'none')}
{if og_t(og_and([og_eq($v_extra, 'stats'), og_gt(og_len(og_get($v_content, ['stats'])), 0)]))}
{capture $c_4}
{foreach og_l(og_get($v_content, ['stats'])) as $v_s}
{var $v_i = $iterator->counter0}
{if og_t(og_lt($v_i, 3))}
{capture $c_3}
{capture $c_1}
{=og_text(og_get($v_s, ['value']))}
{/capture}
{=og_include('compose/Text.latte', ['size' => '2xl', 'weight' => 'semibold', 'children' => (string) $c_1])|noescape}
{capture $c_2}
{=og_text(og_get($v_s, ['label']))}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'xs', 'class' => 'text-muted-foreground', 'children' => (string) $c_2])|noescape}
{/capture}
{=og_include('compose/Stack.latte', ['gap' => '0', 'class' => 'rounded bg-card inset-ring inset-ring-border p-4', 'attrs' => og_attrs(['data-slot', 'hero-stat']), 'children' => (string) $c_3])|noescape}
{/if}
{/foreach}
{/capture}
{=og_include('compose/Box.latte', ['class' => 'grid grid-cols-3 gap-4', 'attrs' => og_attrs(['data-slot', 'hero-stats']), 'children' => (string) $c_4])|noescape}
{/if}
{if og_t(og_and([og_eq($v_extra, 'avatars'), og_gt(og_len(og_get($v_content, ['people'])), 0)]))}
{capture $c_7}
{capture $c_5}
{foreach og_l(og_get($v_content, ['people'])) as $v_p}
{var $v_i = $iterator->counter0}
{if og_t(og_lt($v_i, 4))}
{=og_include('blocks/media-frame.latte', ['p' => ['alt' => og_get($v_p, ['author']), 'src' => og_get($v_p, ['image']), 'ratio' => '1/1', 'className' => og_cnv(['size-10 shrink-0 rounded-full'])]])|noescape}
{/if}
{/foreach}
{/capture}
{=og_include('compose/Group.latte', ['gap' => '2', 'align' => 'center', 'children' => (string) $c_5])|noescape}
{capture $c_6}
{=og_text(og_get($v_content, ['proof']))}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'sm', 'class' => 'text-muted-foreground', 'children' => (string) $c_6])|noescape}
{/capture}
{=og_include('compose/Group.latte', ['gap' => '4', 'align' => 'center', 'class' => 'flex-wrap', 'attrs' => og_attrs(['data-slot', 'hero-proof']), 'children' => (string) $c_7])|noescape}
{/if}
{if og_t(og_and([og_eq($v_extra, 'minis'), og_gt(og_len(og_get($v_content, ['features'])), 0)]))}
{capture $c_13}
{foreach og_l(og_get($v_content, ['features'])) as $v_f}
{var $v_i = $iterator->counter0}
{if og_t(og_lt($v_i, 2))}
{capture $c_12}
{capture $c_8}
{=og_include('icons/LucideIcon.latte', ['name' => og_s(og_get($v_f, ['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_f, ['title']))}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'sm', 'weight' => 'semibold', 'children' => (string) $c_9])|noescape}
{capture $c_10}
{=og_text(og_get($v_f, ['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', 'class' => 'rounded bg-card inset-ring inset-ring-border p-4', 'attrs' => og_attrs(['data-slot', 'hero-mini']), 'children' => (string) $c_12])|noescape}
{/if}
{/foreach}
{/capture}
{=og_include('compose/Box.latte', ['class' => 'grid grid-cols-1 gap-4 sm:grid-cols-2', 'attrs' => og_attrs(['data-slot', 'hero-minis']), 'children' => (string) $c_13])|noescape}
{/if}
{if og_t(og_and([og_eq($v_extra, 'quote'), og_gt(og_len(og_get($v_content, ['people'])), 0)]))}
{capture $c_24}
{foreach og_l(og_get($v_content, ['people'])) as $v_p}
{var $v_i = $iterator->counter0}
{if og_t(og_lt($v_i, 1))}
{capture $c_19}
{capture $c_14}
{=og_text(og_get($v_p, ['quote']))}
{/capture}
{=og_include('compose/Text.latte', ['tag' => 'blockquote', 'class' => 'text-lg font-medium', 'children' => (string) $c_14])|noescape}
{capture $c_18}
{=og_include('blocks/media-frame.latte', ['p' => ['alt' => og_get($v_p, ['author']), 'src' => og_get($v_p, ['image']), 'ratio' => '1/1', 'className' => og_cnv(['size-10 shrink-0 rounded-full'])]])|noescape}
{capture $c_17}
{capture $c_15}
{=og_text(og_get($v_p, ['author']))}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'sm', 'weight' => 'semibold', 'children' => (string) $c_15])|noescape}
{capture $c_16}
{=og_text(og_get($v_p, ['role']))}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'xs', 'class' => 'text-muted-foreground', 'children' => (string) $c_16])|noescape}
{/capture}
{=og_include('compose/Stack.latte', ['gap' => '0', 'children' => (string) $c_17])|noescape}
{/capture}
{=og_include('compose/Group.latte', ['gap' => '4', 'align' => 'center', 'children' => (string) $c_18])|noescape}
{/capture}
{=og_include('blocks/figure-block.latte', ['p' => ['className' => og_cnv(['flex flex-col gap-4']), 'testid' => 'hero-quote'], 'children' => og_markup($c_19)])|noescape}
{/if}
{/foreach}
{capture $c_23}
{foreach og_l(og_get($v_content, ['stats'])) as $v_s}
{var $v_i = $iterator->counter0}
{if og_t(og_lt($v_i, 3))}
{capture $c_22}
{capture $c_20}
{=og_text(og_get($v_s, ['value']))}
{/capture}
{=og_include('compose/Text.latte', ['size' => '2xl', 'weight' => 'semibold', 'children' => (string) $c_20])|noescape}
{capture $c_21}
{=og_text(og_get($v_s, ['label']))}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'xs', 'class' => 'text-muted-foreground', 'children' => (string) $c_21])|noescape}
{/capture}
{=og_include('compose/Stack.latte', ['gap' => '0', 'class' => 'rounded bg-card inset-ring inset-ring-border p-4', 'attrs' => og_attrs(['data-slot', 'hero-stat']), 'children' => (string) $c_22])|noescape}
{/if}
{/foreach}
{/capture}
{=og_include('compose/Box.latte', ['class' => 'grid grid-cols-3 gap-4', 'attrs' => og_attrs(['data-slot', 'hero-stats']), 'children' => (string) $c_23])|noescape}
{/capture}
{=og_include('compose/Stack.latte', ['gap' => '6', 'align' => 'stretch', 'attrs' => og_attrs(['data-slot', 'hero-split-extras']), 'children' => (string) $c_24])|noescape}
{/if}
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-cdnnpx ui8kit add hero-split-extras{#- 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-extras.json
What HeroSplit shows under the lead: three figures in cards, a row of faces with a proof line, two small feature cards, or a quote with its author over three figures.
Props (p): content, extra. -#}
{%- set v_content = og_def(p['content'], none) -%}
{%- set v_extra = og_def(p['extra'], 'none') -%}
{%- if og_t(og_and([og_eq(v_extra, 'stats'), og_gt(og_len(og_get(v_content, ['stats'])), 0)])) %}
{%- set c_4 -%}
{%- for v_s in og_l(og_get(v_content, ['stats'])) %}
{%- set v_i = loop.index0 -%}
{%- if og_t(og_lt(v_i, 3)) %}
{%- set c_3 -%}
{%- set c_1 -%}
{{ og_text(og_get(v_s, ['value'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': '2xl', 'Weight': 'semibold'}, 'children': c_1}) }}
{%- set c_2 -%}
{{ og_text(og_get(v_s, ['label'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_2}) }}
{%- endset -%}
{{ og_include('compose/stack.html.j2', {'p': {'Gap': '0', 'Class': 'rounded bg-card inset-ring inset-ring-border p-4', 'Attrs': og_attrs(['data-slot', 'hero-stat'])}, 'children': c_3}) }}
{%- endif %}
{%- endfor %}
{%- endset -%}
{{ og_include('compose/box.html.j2', {'p': {'Class': 'grid grid-cols-3 gap-4', 'Attrs': og_attrs(['data-slot', 'hero-stats'])}, 'children': c_4}) }}
{%- endif %}
{%- if og_t(og_and([og_eq(v_extra, 'avatars'), og_gt(og_len(og_get(v_content, ['people'])), 0)])) %}
{%- set c_7 -%}
{%- set c_5 -%}
{%- for v_p in og_l(og_get(v_content, ['people'])) %}
{%- set v_i = loop.index0 -%}
{%- if og_t(og_lt(v_i, 4)) %}
{{ og_include('blocks/media-frame.html.j2', {'p': {'alt': og_get(v_p, ['author']), 'src': og_get(v_p, ['image']), 'ratio': '1/1', 'className': og_cnv(['size-10 shrink-0 rounded-full'])}}) }}
{%- endif %}
{%- endfor %}
{%- endset -%}
{{ og_include('compose/group.html.j2', {'p': {'Gap': '2', 'Align': 'center'}, 'children': c_5}) }}
{%- set c_6 -%}
{{ og_text(og_get(v_content, ['proof'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_6}) }}
{%- endset -%}
{{ og_include('compose/group.html.j2', {'p': {'Gap': '4', 'Align': 'center', 'Class': 'flex-wrap', 'Attrs': og_attrs(['data-slot', 'hero-proof'])}, 'children': c_7}) }}
{%- endif %}
{%- if og_t(og_and([og_eq(v_extra, 'minis'), og_gt(og_len(og_get(v_content, ['features'])), 0)])) %}
{%- set c_13 -%}
{%- for v_f in og_l(og_get(v_content, ['features'])) %}
{%- set v_i = loop.index0 -%}
{%- if og_t(og_lt(v_i, 2)) %}
{%- set c_12 -%}
{%- set c_8 -%}
{{ og_include('icons/lucide-icon.html.j2', {'p': {'Name': og_s(og_get(v_f, ['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_f, ['title'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_9}) }}
{%- set c_10 -%}
{{ og_text(og_get(v_f, ['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', 'Class': 'rounded bg-card inset-ring inset-ring-border p-4', 'Attrs': og_attrs(['data-slot', 'hero-mini'])}, 'children': c_12}) }}
{%- endif %}
{%- endfor %}
{%- endset -%}
{{ og_include('compose/box.html.j2', {'p': {'Class': 'grid grid-cols-1 gap-4 sm:grid-cols-2', 'Attrs': og_attrs(['data-slot', 'hero-minis'])}, 'children': c_13}) }}
{%- endif %}
{%- if og_t(og_and([og_eq(v_extra, 'quote'), og_gt(og_len(og_get(v_content, ['people'])), 0)])) %}
{%- set c_24 -%}
{%- for v_p in og_l(og_get(v_content, ['people'])) %}
{%- set v_i = loop.index0 -%}
{%- if og_t(og_lt(v_i, 1)) %}
{%- set c_19 -%}
{%- set c_14 -%}
{{ og_text(og_get(v_p, ['quote'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Tag': 'blockquote', 'Class': 'text-lg font-medium'}, 'children': c_14}) }}
{%- set c_18 -%}
{{ og_include('blocks/media-frame.html.j2', {'p': {'alt': og_get(v_p, ['author']), 'src': og_get(v_p, ['image']), 'ratio': '1/1', 'className': og_cnv(['size-10 shrink-0 rounded-full'])}}) }}
{%- set c_17 -%}
{%- set c_15 -%}
{{ og_text(og_get(v_p, ['author'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_15}) }}
{%- set c_16 -%}
{{ og_text(og_get(v_p, ['role'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_16}) }}
{%- endset -%}
{{ og_include('compose/stack.html.j2', {'p': {'Gap': '0'}, 'children': c_17}) }}
{%- endset -%}
{{ og_include('compose/group.html.j2', {'p': {'Gap': '4', 'Align': 'center'}, 'children': c_18}) }}
{%- endset -%}
{{ og_include('blocks/figure-block.html.j2', {'p': {'className': og_cnv(['flex flex-col gap-4']), 'testid': 'hero-quote'}, 'children': og_markup(c_19)}) }}
{%- endif %}
{%- endfor %}
{%- set c_23 -%}
{%- for v_s in og_l(og_get(v_content, ['stats'])) %}
{%- set v_i = loop.index0 -%}
{%- if og_t(og_lt(v_i, 3)) %}
{%- set c_22 -%}
{%- set c_20 -%}
{{ og_text(og_get(v_s, ['value'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': '2xl', 'Weight': 'semibold'}, 'children': c_20}) }}
{%- set c_21 -%}
{{ og_text(og_get(v_s, ['label'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_21}) }}
{%- endset -%}
{{ og_include('compose/stack.html.j2', {'p': {'Gap': '0', 'Class': 'rounded bg-card inset-ring inset-ring-border p-4', 'Attrs': og_attrs(['data-slot', 'hero-stat'])}, 'children': c_22}) }}
{%- endif %}
{%- endfor %}
{%- endset -%}
{{ og_include('compose/box.html.j2', {'p': {'Class': 'grid grid-cols-3 gap-4', 'Attrs': og_attrs(['data-slot', 'hero-stats'])}, 'children': c_23}) }}
{%- endset -%}
{{ og_include('compose/stack.html.j2', {'p': {'Gap': '6', 'Align': 'stretch', 'Attrs': og_attrs(['data-slot', 'hero-split-extras'])}, 'children': c_24}) }}
{%- endif %}
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.
What HeroSplit shows under the lead: three figures in cards, a row of faces with a proof line, two small feature cards, or a quote with its author over three figures.
| Prop | Type | Default | Description |
|---|---|---|---|
| content (required) | HeroContent | - | the figures, small cards, people, proof line and floating card of the hero |
| extra | "stats" | "avatars" | "minis" | "quote" | "none" | "none" |