Skip to content
ui8kit

block / commerce

Usp Strip

Free delivery, returns, warranty and help in one band.

Install

npx ui8kit add usp-strip

Pulls in: box, compose, empty-state, feature-grid, grid, inline, kit-box, kit-text, list, list-item, lucide-icon, section-frame, stack, text, utils

Preview

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.

Help seven days a week

A person answers within the hour.

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 usp-strip
blocks/usp-strip.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 promises of a store in one band: free delivery, returns, warranty, help. Axes: layout (strip: one muted
  panel, cards: a card each, bar: a thin line of icons and titles), tone, density.
-->
<script lang="ts" module>
  import type { Snippet } from "svelte";
  import type { Feature } from "./feature-grid.types";

  export type UspStripProps = {
    id: string;
    title?: string;
    perks: Feature[];
    empty?: string;
    layout?: "strip" | "cards" | "bar";
    tone?: "default" | "muted";
    density?: "default" | "compact";
    landmarkLabel?: string;
  };
</script>

<script lang="ts">
  import Box from "../compose/Box.svelte";
  import Grid from "../compose/Grid.svelte";
  import Inline from "../compose/Inline.svelte";
  import List from "../compose/List.svelte";
  import ListItem from "../compose/ListItem.svelte";
  import LucideIcon from "../icons/LucideIcon.svelte";
  import Stack from "../compose/Stack.svelte";
  import Text from "../compose/Text.svelte";
  import EmptyState from "../components/empty-state.svelte";
  import SectionFrame from "../components/section-frame.svelte";
  import { cn } from "../utils";

  let {
    id,
    title = "",
    perks,
    empty = "",
    layout = "strip",
    tone = "default",
    density = "default",
    landmarkLabel,
  }: UspStripProps = $props();
</script>

<SectionFrame id={id} title={title} tone={tone} density={density} landmarkLabel={landmarkLabel}>
  {#if ((perks?.length ?? 0) === 0)}
    <EmptyState icon="truck" title={empty} />
  {:else if ((layout as string) === "bar")}
    <List tag="ul" class="flex flex-wrap items-center justify-center gap-x-8 gap-y-4" data-slot="items">
      {#each perks as p (p.id)}
        <ListItem class="flex items-center gap-2 text-sm font-medium" data-slot="item">
          <LucideIcon name={p.icon} size={16} />
          <Inline>
            {p.title}
          </Inline>
        </ListItem>
      {/each}
    </List>
  {:else}
    <Grid
      cols="1-4"
      class={cn("gap-4", (((layout as string) === "strip") ? "rounded bg-muted p-6" : ""))}
      data-slot="items"
    >
      {#each perks as p (p.id)}
        <Stack
          gap="4"
          class={(((layout as string) === "cards") ? "rounded bg-card inset-ring inset-ring-border p-6" : "")}
          data-slot="item"
        >
          <Box class="flex size-10 shrink-0 items-center justify-center rounded bg-muted">
            <LucideIcon name={p.icon} size={20} />
          </Box>
          <Stack gap="2">
            <Text size="sm" weight="semibold">
              {p.title}
            </Text>
            <Text size="sm" class="text-muted-foreground">
              {p.text}
            </Text>
          </Stack>
        </Stack>
      {/each}
    </Grid>
  {/if}
</SectionFrame>

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 usp-strip
blocks/usp-strip.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 promises of a store in one band: free delivery, returns, warranty, help. Axes: layout (strip: one muted
 * panel, cards: a card each, bar: a thin line of icons and titles), tone, density.
 */
import { type ReactNode } from "react";
import { Box, Grid, Inline, List, ListItem, Stack, Text } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import { EmptyState } from "../components/empty-state";
import { SectionFrame } from "../components/section-frame";
import { cn } from "../utils";
import type { Feature } from "./feature-grid.types";

export type UspStripProps = {
  id: string;
  title?: string;
  perks: Feature[];
  empty?: string;
  layout?: "strip" | "cards" | "bar";
  tone?: "default" | "muted";
  density?: "default" | "compact";
  landmarkLabel?: string;
};

export function UspStrip({
  id,
  title = "",
  perks,
  empty = "",
  layout = "strip",
  tone = "default",
  density = "default",
  landmarkLabel,
}: UspStripProps) {
  return (
    <SectionFrame id={id} title={title} tone={tone} density={density} landmarkLabel={landmarkLabel}>
      {((perks?.length ?? 0) === 0) ? (
        <EmptyState icon="truck" title={empty} />
      ) : ((layout as string) === "bar") ? (
        <List tag="ul" className="flex flex-wrap items-center justify-center gap-x-8 gap-y-4" data-slot="items">
          {(perks ?? []).map((p) => (
            <ListItem key={p.id} className="flex items-center gap-2 text-sm font-medium" data-slot="item">
              <LucideIcon name={p.icon} size={16} />
              <Inline>
                {p.title}
              </Inline>
            </ListItem>
          ))}
        </List>
      ) : (
        <Grid
          cols="1-4"
          className={cn("gap-4", (((layout as string) === "strip") ? "rounded bg-muted p-6" : ""))}
          data-slot="items"
        >
          {(perks ?? []).map((p) => (
            <Stack key={p.id}
              gap="4"
              className={
                (layout as string) === "cards" ? "rounded bg-card inset-ring inset-ring-border p-6"
                : ""
              }
              data-slot="item"
            >
              <Box className="flex size-10 shrink-0 items-center justify-center rounded bg-muted">
                <LucideIcon name={p.icon} size={20} />
              </Box>
              <Stack gap="2">
                <Text size="sm" weight="semibold">
                  {p.title}
                </Text>
                <Text size="sm" className="text-muted-foreground">
                  {p.text}
                </Text>
              </Stack>
            </Stack>
          ))}
        </Grid>
      )}
    </SectionFrame>
  );
}

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 usp-strip
blocks/usp-strip.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 promises of a store in one band: free delivery, returns, warranty, help. Axes: layout (strip: one muted
  panel, cards: a card each, bar: a thin line of icons and titles), tone, density.
-->
<script lang="ts">
import type { Feature } from "./feature-grid.types";

export type UspStripProps = {
  id: string;
  title?: string;
  perks: Feature[];
  empty?: string;
  layout?: "strip" | "cards" | "bar";
  tone?: "default" | "muted";
  density?: "default" | "compact";
  landmarkLabel?: string;
};
</script>

<script setup lang="ts">
import Box from "../compose/Box.vue";
import Grid from "../compose/Grid.vue";
import Inline from "../compose/Inline.vue";
import List from "../compose/List.vue";
import ListItem from "../compose/ListItem.vue";
import LucideIcon from "../icons/LucideIcon.vue";
import Stack from "../compose/Stack.vue";
import Text from "../compose/Text.vue";
import EmptyState from "../components/empty-state.vue";
import SectionFrame from "../components/section-frame.vue";
import { cn } from "../utils";

const {
  id,
  title = "",
  perks,
  empty = "",
  layout = "strip",
  tone = "default",
  density = "default",
  landmarkLabel,
} = defineProps<UspStripProps>();
</script>

<template>
  <SectionFrame :id="id" :title="title" :tone="tone" :density="density" :landmarkLabel="landmarkLabel">
    <EmptyState v-if="((perks?.length ?? 0) === 0)" icon="truck" :title="empty" />
    <List
      v-else-if="((layout as string) === 'bar')"
      tag="ul"
      class="flex flex-wrap items-center justify-center gap-x-8 gap-y-4"
      data-slot="items"
    >
      <ListItem v-for="p in perks" :key="p.id" class="flex items-center gap-2 text-sm font-medium" data-slot="item">
        <LucideIcon :name="p.icon" :size="16" />
        <Inline>
          {{ p.title }}
        </Inline>
      </ListItem>
    </List>
    <Grid v-else
      cols="1-4"
      :class="cn('gap-4', (((layout as string) === 'strip') ? 'rounded bg-muted p-6' : ''))"
      data-slot="items"
    >
      <Stack v-for="p in perks" :key="p.id"
        gap="4"
        :class="(((layout as string) === 'cards') ? 'rounded bg-card inset-ring inset-ring-border p-6' : '')"
        data-slot="item"
      >
        <Box class="flex size-10 shrink-0 items-center justify-center rounded bg-muted">
          <LucideIcon :name="p.icon" :size="20" />
        </Box>
        <Stack gap="2">
          <Text size="sm" weight="semibold">
            {{ p.title }}
          </Text>
          <Text size="sm" class="text-muted-foreground">
            {{ p.text }}
          </Text>
        </Stack>
      </Stack>
    </Grid>
  </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 usp-strip
blocks/usp-strip.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 promises of a store in one band: free delivery, returns, warranty, help. Axes: layout (strip: one muted
 * panel, cards: a card each, bar: a thin line of icons and titles), tone, density.
 */
import { For, type JSX } from "solid-js";
import { Box, Grid, Inline, List, ListItem, Stack, Text } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import { EmptyState } from "../components/empty-state";
import { SectionFrame } from "../components/section-frame";
import { cn } from "../utils";
import type { Feature } from "./feature-grid.types";

export type UspStripProps = {
  id: string;
  title?: string;
  perks: Feature[];
  empty?: string;
  layout?: "strip" | "cards" | "bar";
  tone?: "default" | "muted";
  density?: "default" | "compact";
  landmarkLabel?: string;
};

export function UspStrip({
  id,
  title = "",
  perks,
  empty = "",
  layout = "strip",
  tone = "default",
  density = "default",
  landmarkLabel,
}: UspStripProps) {
  return (
    <SectionFrame id={id} title={title} tone={tone} density={density} landmarkLabel={landmarkLabel}>
      {((perks?.length ?? 0) === 0) ? (
        <EmptyState icon="truck" title={empty} />
      ) : ((layout as string) === "bar") ? (
        <List tag="ul" class="flex flex-wrap items-center justify-center gap-x-8 gap-y-4" data-slot="items">
          <For each={perks ?? []}>{(p) => (
            <ListItem class="flex items-center gap-2 text-sm font-medium" data-slot="item">
              <LucideIcon name={p.icon} size={16} />
              <Inline>
                {p.title}
              </Inline>
            </ListItem>
          )}</For>
        </List>
      ) : (
        <Grid
          cols="1-4"
          class={cn("gap-4", (((layout as string) === "strip") ? "rounded bg-muted p-6" : ""))}
          data-slot="items"
        >
          <For each={perks ?? []}>{(p) => (
            <Stack
              gap="4"
              class={(((layout as string) === "cards") ? "rounded bg-card inset-ring inset-ring-border p-6" : "")}
              data-slot="item"
            >
              <Box class="flex size-10 shrink-0 items-center justify-center rounded bg-muted">
                <LucideIcon name={p.icon} size={20} />
              </Box>
              <Stack gap="2">
                <Text size="sm" weight="semibold">
                  {p.title}
                </Text>
                <Text size="sm" class="text-muted-foreground">
                  {p.text}
                </Text>
              </Stack>
            </Stack>
          )}</For>
        </Grid>
      )}
    </SectionFrame>
  );
}

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 usp-strip
blocks/usp-strip.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/usp-strip.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"
)

// UspStripProps are the props of UspStrip; the values are the JSON shapes of the TypeScript props.
type UspStripProps struct {
	Id any `json:"id"`
	Title any `json:"title"`
	Perks any `json:"perks"`
	Empty any `json:"empty"`
	Layout any `json:"layout"`
	Tone any `json:"tone"`
	Density any `json:"density"`
	LandmarkLabel any `json:"landmarkLabel"`
}

// The promises of a store in one band: free delivery, returns, warranty, help. Axes: layout (strip: one muted panel, cards: a card each, bar: a thin line of icons and titles), tone, density.
templ UspStrip(p UspStripProps) {
	{{ vId := p.Id }}
	{{ vTitle := uiutils.Def(p.Title, "") }}
	{{ vPerks := p.Perks }}
	{{ vEmpty := uiutils.Def(p.Empty, "") }}
	{{ vLayout := uiutils.Def(p.Layout, "strip") }}
	{{ vTone := uiutils.Def(p.Tone, "default") }}
	{{ vDensity := uiutils.Def(p.Density, "default") }}
	{{ vLandmarkLabel := p.LandmarkLabel }}
	@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Tone: vTone, Density: vDensity, LandmarkLabel: vLandmarkLabel}) {
		if uiutils.Eq(uiutils.Len(vPerks), float64(0)) {
			@EmptyState(EmptyStateProps{Icon: "truck", Title: vEmpty})
		} else if uiutils.Eq(vLayout, "bar") {
			@compose.List(compose.ListProps{BoxProps: box.BoxProps{Tag: "ul", Class: "flex flex-wrap items-center justify-center gap-x-8 gap-y-4", Attrs: uiutils.Attrs("data-slot", "items")}}) {
				for _, vP := range uiutils.L(vPerks) {
					@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Class: "flex items-center gap-2 text-sm font-medium", Attrs: uiutils.Attrs("data-slot", "item")}}) {
						@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(uiutils.Get(vP, "icon")), Size: 16})
						@compose.Inline(compose.InlineProps{TextProps: text.TextProps{}}) {
							{ uiutils.Text(uiutils.Get(vP, "title")) }
						}
					}
				}
			}
		} else {
			@compose.Grid(compose.GridProps{Cols: "1-4", BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv("gap-4", uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "strip")), "rounded bg-muted p-6", ""))), Attrs: uiutils.Attrs("data-slot", "items")}}) {
				for _, vP := range uiutils.L(vPerks) {
					@compose.Stack(compose.StackProps{Gap: "4", BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "cards")), "rounded bg-card inset-ring inset-ring-border p-6", "")), Attrs: uiutils.Attrs("data-slot", "item")}}) {
						@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: "2", 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: "sm", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
								{ uiutils.Text(uiutils.Get(vP, "text")) }
							}
						}
					}
				}
			}
		}
	}
}

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 usp-strip
blocks/usp-strip.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/usp-strip.json
    The promises of a store in one band: free delivery, returns, warranty, help. Axes: layout (strip: one muted panel, cards: a card each, bar: a thin line of icons and titles), tone, density.
    Props (p): id, title, perks, empty, layout, tone, density, landmarkLabel. -#}
{%- set v_id = (p.id ?? null) -%}
{%- set v_title = (p.title ?? '') -%}
{%- set v_perks = (p.perks ?? null) -%}
{%- set v_empty = (p.empty ?? '') -%}
{%- set v_layout = (p.layout ?? 'strip') -%}
{%- set v_tone = (p.tone ?? 'default') -%}
{%- set v_density = (p.density ?? 'default') -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- set c_10 -%}
  {%- if og_t(og_eq(og_len(v_perks), 0)) %}
    {{ include('blocks/empty-state.html.twig', {'p': {'icon': 'truck', 'title': v_empty}}, with_context = false) }}
  {%- elseif og_t(og_eq(v_layout, 'bar')) %}
    {%- set c_3 -%}
      {%- for v_p in og_l(v_perks) %}
        {%- set c_2 -%}
          {{ include('icons/LucideIcon.html.twig', {'name': og_s(og_get(v_p, ['icon'])), 'size': 16}, with_context = false) }}
          {%- set c_1 -%}
            {{ og_text(og_get(v_p, ['title'])) }}
          {%- endset -%}
          {{ include('compose/Inline.html.twig', {'children': c_1}, with_context = false) }}
        {%- endset -%}
        {{ include('compose/ListItem.html.twig', {'class': 'flex items-center gap-2 text-sm font-medium', 'attrs': og_attrs(['data-slot', 'item']), 'children': c_2}, with_context = false) }}
      {%- endfor %}
    {%- endset -%}
    {{ include('compose/List.html.twig', {'tag': 'ul', 'class': 'flex flex-wrap items-center justify-center gap-x-8 gap-y-4', 'attrs': og_attrs(['data-slot', 'items']), 'children': c_3}, with_context = false) }}
  {%- else %}
    {%- set c_9 -%}
      {%- for v_p in og_l(v_perks) %}
        {%- set c_8 -%}
          {%- set c_4 -%}
            {{ 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_4}, with_context = false) }}
          {%- set c_7 -%}
            {%- set c_5 -%}
              {{ og_text(og_get(v_p, ['title'])) }}
            {%- endset -%}
            {{ include('compose/Text.html.twig', {'size': 'sm', 'weight': 'semibold', 'children': c_5}, with_context = false) }}
            {%- set c_6 -%}
              {{ og_text(og_get(v_p, ['text'])) }}
            {%- endset -%}
            {{ include('compose/Text.html.twig', {'size': 'sm', 'class': 'text-muted-foreground', 'children': c_6}, with_context = false) }}
          {%- endset -%}
          {{ include('compose/Stack.html.twig', {'gap': '2', 'children': c_7}, with_context = false) }}
        {%- endset -%}
        {{ include('compose/Stack.html.twig', {'gap': '4', 'class': og_s((og_t(og_eq(v_layout, 'cards')) ? 'rounded bg-card inset-ring inset-ring-border p-6' : '')), 'attrs': og_attrs(['data-slot', 'item']), 'children': c_8}, with_context = false) }}
      {%- endfor %}
    {%- endset -%}
    {{ include('compose/Grid.html.twig', {'cols': '1-4', 'class': og_s(og_cnv(['gap-4', (og_t(og_eq(v_layout, 'strip')) ? 'rounded bg-muted p-6' : '')])), 'attrs': og_attrs(['data-slot', 'items']), 'children': c_9}, with_context = false) }}
  {%- endif %}
{%- endset -%}
{{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'title': v_title, 'tone': v_tone, 'density': v_density, 'landmarkLabel': v_landmarkLabel}, 'children': og_markup(c_10)}, 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 usp-strip
blocks/usp-strip.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/usp-strip.json
    The promises of a store in one band: free delivery, returns, warranty, help. Axes: layout (strip: one muted panel, cards: a card each, bar: a thin line of icons and titles), tone, density.
    Props (p): id, title, perks, empty, layout, tone, density, landmarkLabel. *}
{var $v_id = ($p['id'] ?? null)}
{var $v_title = ($p['title'] ?? '')}
{var $v_perks = ($p['perks'] ?? null)}
{var $v_empty = ($p['empty'] ?? '')}
{var $v_layout = ($p['layout'] ?? 'strip')}
{var $v_tone = ($p['tone'] ?? 'default')}
{var $v_density = ($p['density'] ?? 'default')}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{capture $c_10}
  {if og_t(og_eq(og_len($v_perks), 0))}
    {=og_include('blocks/empty-state.latte', ['p' => ['icon' => 'truck', 'title' => $v_empty]])|noescape}
  {elseif og_t(og_eq($v_layout, 'bar'))}
    {capture $c_3}
      {foreach og_l($v_perks) as $v_p}
        {capture $c_2}
          {=og_include('icons/LucideIcon.latte', ['name' => og_s(og_get($v_p, ['icon'])), 'size' => 16])|noescape}
          {capture $c_1}
            {=og_text(og_get($v_p, ['title']))}
          {/capture}
          {=og_include('compose/Inline.latte', ['children' => (string) $c_1])|noescape}
        {/capture}
        {=og_include('compose/ListItem.latte', ['class' => 'flex items-center gap-2 text-sm font-medium', 'attrs' => og_attrs(['data-slot', 'item']), 'children' => (string) $c_2])|noescape}
      {/foreach}
    {/capture}
    {=og_include('compose/List.latte', ['tag' => 'ul', 'class' => 'flex flex-wrap items-center justify-center gap-x-8 gap-y-4', 'attrs' => og_attrs(['data-slot', 'items']), 'children' => (string) $c_3])|noescape}
  {else}
    {capture $c_9}
      {foreach og_l($v_perks) as $v_p}
        {capture $c_8}
          {capture $c_4}
            {=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_4])|noescape}
          {capture $c_7}
            {capture $c_5}
              {=og_text(og_get($v_p, ['title']))}
            {/capture}
            {=og_include('compose/Text.latte', ['size' => 'sm', 'weight' => 'semibold', 'children' => (string) $c_5])|noescape}
            {capture $c_6}
              {=og_text(og_get($v_p, ['text']))}
            {/capture}
            {=og_include('compose/Text.latte', ['size' => 'sm', 'class' => 'text-muted-foreground', 'children' => (string) $c_6])|noescape}
          {/capture}
          {=og_include('compose/Stack.latte', ['gap' => '2', 'children' => (string) $c_7])|noescape}
        {/capture}
        {=og_include('compose/Stack.latte', ['gap' => '4', 'class' => og_s((og_t(og_eq($v_layout, 'cards')) ? 'rounded bg-card inset-ring inset-ring-border p-6' : '')), 'attrs' => og_attrs(['data-slot', 'item']), 'children' => (string) $c_8])|noescape}
      {/foreach}
    {/capture}
    {=og_include('compose/Grid.latte', ['cols' => '1-4', 'class' => og_s(og_cnv(['gap-4', (og_t(og_eq($v_layout, 'strip')) ? 'rounded bg-muted p-6' : '')])), 'attrs' => og_attrs(['data-slot', 'items']), 'children' => (string) $c_9])|noescape}
  {/if}
{/capture}
{=og_include('blocks/section-frame.latte', ['p' => ['id' => $v_id, 'title' => $v_title, 'tone' => $v_tone, 'density' => $v_density, 'landmarkLabel' => $v_landmarkLabel], 'children' => og_markup($c_10)])|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 usp-strip
blocks/usp-strip.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/usp-strip.json
    The promises of a store in one band: free delivery, returns, warranty, help. Axes: layout (strip: one muted panel, cards: a card each, bar: a thin line of icons and titles), tone, density.
    Props (p): id, title, perks, empty, layout, tone, density, landmarkLabel. -#}
{%- set v_id = og_def(p['id'], none) -%}
{%- set v_title = og_def(p['title'], '') -%}
{%- set v_perks = og_def(p['perks'], none) -%}
{%- set v_empty = og_def(p['empty'], '') -%}
{%- set v_layout = og_def(p['layout'], 'strip') -%}
{%- set v_tone = og_def(p['tone'], 'default') -%}
{%- set v_density = og_def(p['density'], 'default') -%}
{%- set v_landmarkLabel = og_def(p['landmarkLabel'], none) -%}
{%- set c_10 -%}
  {%- if og_t(og_eq(og_len(v_perks), 0)) %}
    {{ og_include('blocks/empty-state.html.j2', {'p': {'icon': 'truck', 'title': v_empty}}) }}
  {%- elif og_t(og_eq(v_layout, 'bar')) %}
    {%- set c_3 -%}
      {%- for v_p in og_l(v_perks) %}
        {%- set c_2 -%}
          {{ og_include('icons/lucide-icon.html.j2', {'p': {'Name': og_s(og_get(v_p, ['icon'])), 'Size': 16}}) }}
          {%- set c_1 -%}
            {{ og_text(og_get(v_p, ['title'])) }}
          {%- endset -%}
          {{ og_include('compose/inline.html.j2', {'p': {}, 'children': c_1}) }}
        {%- endset -%}
        {{ og_include('compose/list-item.html.j2', {'p': {'Class': 'flex items-center gap-2 text-sm font-medium', 'Attrs': og_attrs(['data-slot', 'item'])}, 'children': c_2}) }}
      {%- endfor %}
    {%- endset -%}
    {{ og_include('compose/list.html.j2', {'p': {'Tag': 'ul', 'Class': 'flex flex-wrap items-center justify-center gap-x-8 gap-y-4', 'Attrs': og_attrs(['data-slot', 'items'])}, 'children': c_3}) }}
  {%- else %}
    {%- set c_9 -%}
      {%- for v_p in og_l(v_perks) %}
        {%- set c_8 -%}
          {%- set c_4 -%}
            {{ 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_4}) }}
          {%- set c_7 -%}
            {%- set c_5 -%}
              {{ og_text(og_get(v_p, ['title'])) }}
            {%- endset -%}
            {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_5}) }}
            {%- set c_6 -%}
              {{ og_text(og_get(v_p, ['text'])) }}
            {%- endset -%}
            {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_6}) }}
          {%- endset -%}
          {{ og_include('compose/stack.html.j2', {'p': {'Gap': '2'}, 'children': c_7}) }}
        {%- endset -%}
        {{ og_include('compose/stack.html.j2', {'p': {'Gap': '4', 'Class': og_s(('rounded bg-card inset-ring inset-ring-border p-6' if og_t(og_eq(v_layout, 'cards')) else '')), 'Attrs': og_attrs(['data-slot', 'item'])}, 'children': c_8}) }}
      {%- endfor %}
    {%- endset -%}
    {{ og_include('compose/grid.html.j2', {'p': {'Cols': '1-4', 'Class': og_s(og_cnv(['gap-4', ('rounded bg-muted p-6' if og_t(og_eq(v_layout, 'strip')) else '')])), 'Attrs': og_attrs(['data-slot', 'items'])}, 'children': c_9}) }}
  {%- endif %}
{%- endset -%}
{{ og_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'tone': v_tone, 'density': v_density, 'landmarkLabel': v_landmarkLabel}, 'children': og_markup(c_10)}) }}

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 promises of a store in one band: free delivery, returns, warranty, help. Axes: layout (strip: one muted panel, cards: a card each, bar: a thin line of icons and titles), tone, density.

Props of UspStrip
PropTypeDefault Description
id (required)string-
title string""section heading; empty: no heading (the section is named by id)
perks (required)Feature[]-
empty string""the text of the empty state (no records), from the dictionary
layout "strip" | "cards" | "bar""strip"
tone "default" | "muted""default"
density "default" | "compact""default"
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