Skip to content
ui8kit

block / commerce

Delivery Info

How delivery works: the facts, then the zones.

Install

npx ui8kit add delivery-info

Pulls in: badge, box, compose, feature-grid, grid, group, kit-box, kit-text, lucide-icon, section-frame, stack, text, title, utils, zone-table

Preview

Delivery

How we pack, when we come and what it costs.

Two-hour windows

Pick a window when you check out; the courier calls ten minutes before.

Careful packing

Fragile items travel in padded boxes, one order per box.

Delivery from $12

Free from $75 in the central zone.

The nearest hub

Orders leave from the hub closest to your address.

Zones

Central zone

90 minutes

Old Town, Riverside, Market Square

Free from $75

Inner suburbs

2 hours

Northfield, Elm Park, Harbour

Free from $100

Outer towns

Same day

Westbrook, Hillside, Lakeview

Free from $150

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 delivery-info
blocks/delivery-info.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. -->
<!--
  How delivery works: the facts as icon cards, then the zones with their time and the order that ships free.
  Axes: layout (full: facts over zone cards, facts: the facts only, split: the facts beside a list of zones),
  tone, density.
-->
<script lang="ts" module>
  import type { Snippet } from "svelte";
  import type { DeliveryLabels } from "./delivery-info.types";
  import type { Feature } from "./feature-grid.types";
  import type { Zone } from "./zone-table.types";

  export type DeliveryInfoProps = {
    id: string;
    title: string;
    lead?: string;
    facts: Feature[];
    zones: Zone[];
    labels: DeliveryLabels;
    layout?: "full" | "facts" | "split";
    tone?: "default" | "muted";
    density?: "default" | "compact";
    landmarkLabel?: string;
  };
</script>

<script lang="ts">
  import Badge from "../compose/Badge.svelte";
  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 Title from "../compose/Title.svelte";
  import SectionFrame from "../components/section-frame.svelte";
  import { cn, fmtMoney, tpl } from "../utils";

  let {
    id,
    title,
    lead = "",
    facts,
    zones,
    labels,
    layout = "full",
    tone = "default",
    density = "default",
    landmarkLabel,
  }: DeliveryInfoProps = $props();
</script>

<SectionFrame id={id} title={title} lead={lead} tone={tone} density={density} landmarkLabel={landmarkLabel}>
  <Box
    class={cn(
      "grid grid-cols-1 gap-8",
      (((layout as string) === "split") ? "items-start md:grid-cols-2" : "")
    )}
  >
    {#if ((facts?.length ?? 0) > 0)}
      <Grid cols={(((layout as string) === "split") ? "1-2" : "1-4")} class="gap-4" data-slot="facts">
        {#each facts as f (f.id)}
          <Stack gap="4" class="rounded bg-card inset-ring inset-ring-border p-6" data-slot="fact">
            <Box class="flex size-10 shrink-0 items-center justify-center rounded bg-muted">
              <LucideIcon name={f.icon} size={20} />
            </Box>
            <Stack gap="2">
              <Text size="sm" weight="semibold">
                {f.title}
              </Text>
              <Text size="sm" class="text-muted-foreground">
                {f.text}
              </Text>
            </Stack>
          </Stack>
        {/each}
      </Grid>
    {/if}
    {#if (((layout as string) !== "facts") && ((zones?.length ?? 0) > 0))}
      <Stack gap="4" align="stretch">
        <Title as={3} size="lg" weight="bold">
          {labels.zones}
        </Title>
        <Box
          class={
            (layout as string) === "split" ? "flex flex-col gap-4"
            : "grid grid-cols-1 gap-4 md:grid-cols-3"
          }
        >
          {#each zones as z (z.id)}
            <Stack
              gap="2"
              class={
                (layout as string) === "split" ? "border-b border-border pb-4"
                : "rounded bg-card inset-ring inset-ring-border p-6"
              }
              data-slot="zone"
            >
              <Group gap="4" align="baseline" justify="between">
                <Text size="sm" weight="semibold">
                  {z.name}
                </Text>
                <Badge variant="secondary" size="default">
                  {z.time}
                </Badge>
              </Group>
              <Text size="sm" class="text-muted-foreground">
                {z.area}
              </Text>
              <Text size="sm" weight="medium">
                {tpl(labels.freeFrom, fmtMoney(z.freeFrom, z.currency))}
              </Text>
            </Stack>
          {/each}
        </Box>
      </Stack>
    {/if}
  </Box>
</SectionFrame>
blocks/delivery-info.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 DeliveryLabels = {
  zones: string;
  freeFrom: 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 delivery-info
blocks/delivery-info.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.
/**
 * How delivery works: the facts as icon cards, then the zones with their time and the order that ships free.
 * Axes: layout (full: facts over zone cards, facts: the facts only, split: the facts beside a list of zones),
 * tone, density.
 */
import { type ReactNode } from "react";
import { Badge, Box, Grid, Group, Stack, Text, Title } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import { SectionFrame } from "../components/section-frame";
import { cn, fmtMoney, tpl } from "../utils";
import type { DeliveryLabels } from "./delivery-info.types";
import type { Feature } from "./feature-grid.types";
import type { Zone } from "./zone-table.types";

export type DeliveryInfoProps = {
  id: string;
  title: string;
  lead?: string;
  facts: Feature[];
  zones: Zone[];
  labels: DeliveryLabels;
  layout?: "full" | "facts" | "split";
  tone?: "default" | "muted";
  density?: "default" | "compact";
  landmarkLabel?: string;
};

export function DeliveryInfo({
  id,
  title,
  lead = "",
  facts,
  zones,
  labels,
  layout = "full",
  tone = "default",
  density = "default",
  landmarkLabel,
}: DeliveryInfoProps) {
  return (
    <SectionFrame id={id} title={title} lead={lead} tone={tone} density={density} landmarkLabel={landmarkLabel}>
      <Box
        className={cn(
          "grid grid-cols-1 gap-8",
          (((layout as string) === "split") ? "items-start md:grid-cols-2" : "")
        )}
      >
        {((facts?.length ?? 0) > 0) ? (
          <Grid cols={(((layout as string) === "split") ? "1-2" : "1-4")} className="gap-4" data-slot="facts">
            {(facts ?? []).map((f) => (
              <Stack key={f.id} gap="4" className="rounded bg-card inset-ring inset-ring-border p-6" data-slot="fact">
                <Box className="flex size-10 shrink-0 items-center justify-center rounded bg-muted">
                  <LucideIcon name={f.icon} size={20} />
                </Box>
                <Stack gap="2">
                  <Text size="sm" weight="semibold">
                    {f.title}
                  </Text>
                  <Text size="sm" className="text-muted-foreground">
                    {f.text}
                  </Text>
                </Stack>
              </Stack>
            ))}
          </Grid>
        ) : null}
        {(((layout as string) !== "facts") && ((zones?.length ?? 0) > 0)) ? (
          <Stack gap="4" align="stretch">
            <Title as={3} size="lg" weight="bold">
              {labels.zones}
            </Title>
            <Box
              className={
                (layout as string) === "split" ? "flex flex-col gap-4"
                : "grid grid-cols-1 gap-4 md:grid-cols-3"
              }
            >
              {(zones ?? []).map((z) => (
                <Stack key={z.id}
                  gap="2"
                  className={
                    (layout as string) === "split" ? "border-b border-border pb-4"
                    : "rounded bg-card inset-ring inset-ring-border p-6"
                  }
                  data-slot="zone"
                >
                  <Group gap="4" align="baseline" justify="between">
                    <Text size="sm" weight="semibold">
                      {z.name}
                    </Text>
                    <Badge variant="secondary" size="default">
                      {z.time}
                    </Badge>
                  </Group>
                  <Text size="sm" className="text-muted-foreground">
                    {z.area}
                  </Text>
                  <Text size="sm" weight="medium">
                    {tpl(labels.freeFrom, fmtMoney(z.freeFrom, z.currency))}
                  </Text>
                </Stack>
              ))}
            </Box>
          </Stack>
        ) : null}
      </Box>
    </SectionFrame>
  );
}
blocks/delivery-info.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 DeliveryLabels = {
  zones: string;
  freeFrom: 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 delivery-info
blocks/delivery-info.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 DeliveryLabels = {
  zones: string;
  freeFrom: string;
};
blocks/delivery-info.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. -->
<!--
  How delivery works: the facts as icon cards, then the zones with their time and the order that ships free.
  Axes: layout (full: facts over zone cards, facts: the facts only, split: the facts beside a list of zones),
  tone, density.
-->
<script lang="ts">
import type { DeliveryLabels } from "./delivery-info.types";
import type { Feature } from "./feature-grid.types";
import type { Zone } from "./zone-table.types";

export type DeliveryInfoProps = {
  id: string;
  title: string;
  lead?: string;
  facts: Feature[];
  zones: Zone[];
  labels: DeliveryLabels;
  layout?: "full" | "facts" | "split";
  tone?: "default" | "muted";
  density?: "default" | "compact";
  landmarkLabel?: string;
};
</script>

<script setup lang="ts">
import Badge from "../compose/Badge.vue";
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 Title from "../compose/Title.vue";
import SectionFrame from "../components/section-frame.vue";
import { cn, fmtMoney, tpl } from "../utils";

const {
  id,
  title,
  lead = "",
  facts,
  zones,
  labels,
  layout = "full",
  tone = "default",
  density = "default",
  landmarkLabel,
} = defineProps<DeliveryInfoProps>();
</script>

<template>
  <SectionFrame
    :id="id"
    :title="title"
    :lead="lead"
    :tone="tone"
    :density="density"
    :landmarkLabel="landmarkLabel"
  >
    <Box
      :class="cn(
        'grid grid-cols-1 gap-8',
        (((layout as string) === 'split') ? 'items-start md:grid-cols-2' : '')
      )"
    >
      <Grid
        v-if="((facts?.length ?? 0) > 0)"
        :cols="(((layout as string) === 'split') ? '1-2' : '1-4')"
        class="gap-4"
        data-slot="facts"
      >
        <Stack
          v-for="f in facts"
          :key="f.id"
          gap="4"
          class="rounded bg-card inset-ring inset-ring-border p-6"
          data-slot="fact"
        >
          <Box class="flex size-10 shrink-0 items-center justify-center rounded bg-muted">
            <LucideIcon :name="f.icon" :size="20" />
          </Box>
          <Stack gap="2">
            <Text size="sm" weight="semibold">
              {{ f.title }}
            </Text>
            <Text size="sm" class="text-muted-foreground">
              {{ f.text }}
            </Text>
          </Stack>
        </Stack>
      </Grid>
      <Stack v-if="(((layout as string) !== 'facts') && ((zones?.length ?? 0) > 0))" gap="4" align="stretch">
        <Title :as="3" size="lg" weight="bold">
          {{ labels.zones }}
        </Title>
        <Box
          :class="
            (layout as string) === 'split' ? 'flex flex-col gap-4'
            : 'grid grid-cols-1 gap-4 md:grid-cols-3'
          "
        >
          <Stack v-for="z in zones" :key="z.id"
            gap="2"
            :class="
              (layout as string) === 'split' ? 'border-b border-border pb-4'
              : 'rounded bg-card inset-ring inset-ring-border p-6'
            "
            data-slot="zone"
          >
            <Group gap="4" align="baseline" justify="between">
              <Text size="sm" weight="semibold">
                {{ z.name }}
              </Text>
              <Badge variant="secondary" size="default">
                {{ z.time }}
              </Badge>
            </Group>
            <Text size="sm" class="text-muted-foreground">
              {{ z.area }}
            </Text>
            <Text size="sm" weight="medium">
              {{ tpl(labels.freeFrom, fmtMoney(z.freeFrom, z.currency)) }}
            </Text>
          </Stack>
        </Box>
      </Stack>
    </Box>
  </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 delivery-info
blocks/delivery-info.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.
/**
 * How delivery works: the facts as icon cards, then the zones with their time and the order that ships free.
 * Axes: layout (full: facts over zone cards, facts: the facts only, split: the facts beside a list of zones),
 * tone, density.
 */
import { For, type JSX } from "solid-js";
import { Badge, Box, Grid, Group, Stack, Text, Title } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import { SectionFrame } from "../components/section-frame";
import { cn, fmtMoney, tpl } from "../utils";
import type { DeliveryLabels } from "./delivery-info.types";
import type { Feature } from "./feature-grid.types";
import type { Zone } from "./zone-table.types";

export type DeliveryInfoProps = {
  id: string;
  title: string;
  lead?: string;
  facts: Feature[];
  zones: Zone[];
  labels: DeliveryLabels;
  layout?: "full" | "facts" | "split";
  tone?: "default" | "muted";
  density?: "default" | "compact";
  landmarkLabel?: string;
};

export function DeliveryInfo({
  id,
  title,
  lead = "",
  facts,
  zones,
  labels,
  layout = "full",
  tone = "default",
  density = "default",
  landmarkLabel,
}: DeliveryInfoProps) {
  return (
    <SectionFrame id={id} title={title} lead={lead} tone={tone} density={density} landmarkLabel={landmarkLabel}>
      <Box
        class={cn(
          "grid grid-cols-1 gap-8",
          (((layout as string) === "split") ? "items-start md:grid-cols-2" : "")
        )}
      >
        {((facts?.length ?? 0) > 0) ? (
          <Grid cols={(((layout as string) === "split") ? "1-2" : "1-4")} class="gap-4" data-slot="facts">
            <For each={facts ?? []}>{(f) => (
              <Stack gap="4" class="rounded bg-card inset-ring inset-ring-border p-6" data-slot="fact">
                <Box class="flex size-10 shrink-0 items-center justify-center rounded bg-muted">
                  <LucideIcon name={f.icon} size={20} />
                </Box>
                <Stack gap="2">
                  <Text size="sm" weight="semibold">
                    {f.title}
                  </Text>
                  <Text size="sm" class="text-muted-foreground">
                    {f.text}
                  </Text>
                </Stack>
              </Stack>
            )}</For>
          </Grid>
        ) : null}
        {(((layout as string) !== "facts") && ((zones?.length ?? 0) > 0)) ? (
          <Stack gap="4" align="stretch">
            <Title as={3} size="lg" weight="bold">
              {labels.zones}
            </Title>
            <Box
              class={
                (layout as string) === "split" ? "flex flex-col gap-4"
                : "grid grid-cols-1 gap-4 md:grid-cols-3"
              }
            >
              <For each={zones ?? []}>{(z) => (
                <Stack
                  gap="2"
                  class={
                    (layout as string) === "split" ? "border-b border-border pb-4"
                    : "rounded bg-card inset-ring inset-ring-border p-6"
                  }
                  data-slot="zone"
                >
                  <Group gap="4" align="baseline" justify="between">
                    <Text size="sm" weight="semibold">
                      {z.name}
                    </Text>
                    <Badge variant="secondary" size="default">
                      {z.time}
                    </Badge>
                  </Group>
                  <Text size="sm" class="text-muted-foreground">
                    {z.area}
                  </Text>
                  <Text size="sm" weight="medium">
                    {tpl(labels.freeFrom, fmtMoney(z.freeFrom, z.currency))}
                  </Text>
                </Stack>
              )}</For>
            </Box>
          </Stack>
        ) : null}
      </Box>
    </SectionFrame>
  );
}
blocks/delivery-info.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 DeliveryLabels = {
  zones: string;
  freeFrom: 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 delivery-info
blocks/delivery-info.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/delivery-info.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"
)

// DeliveryInfoProps are the props of DeliveryInfo; the values are the JSON shapes of the TypeScript props.
type DeliveryInfoProps struct {
	Id any `json:"id"`
	Title any `json:"title"`
	Lead any `json:"lead"`
	Facts any `json:"facts"`
	Zones any `json:"zones"`
	Labels any `json:"labels"`
	Layout any `json:"layout"`
	Tone any `json:"tone"`
	Density any `json:"density"`
	LandmarkLabel any `json:"landmarkLabel"`
}

// How delivery works: the facts as icon cards, then the zones with their time and the order that ships free. Axes: layout (full: facts over zone cards, facts: the facts only, split: the facts beside a list of zones), tone, density.
templ DeliveryInfo(p DeliveryInfoProps) {
	{{ vId := p.Id }}
	{{ vTitle := p.Title }}
	{{ vLead := uiutils.Def(p.Lead, "") }}
	{{ vFacts := p.Facts }}
	{{ vZones := p.Zones }}
	{{ vLabels := p.Labels }}
	{{ vLayout := uiutils.Def(p.Layout, "full") }}
	{{ vTone := uiutils.Def(p.Tone, "default") }}
	{{ vDensity := uiutils.Def(p.Density, "default") }}
	{{ vLandmarkLabel := p.LandmarkLabel }}
	@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Lead: vLead, Tone: vTone, Density: vDensity, LandmarkLabel: vLandmarkLabel}) {
		@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv("grid grid-cols-1 gap-8", uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "split")), "items-start md:grid-cols-2", "")))}}) {
			if uiutils.Gt(uiutils.Len(vFacts), float64(0)) {
				@compose.Grid(compose.GridProps{Cols: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "split")), "1-2", "1-4")), BoxProps: box.BoxProps{Class: "gap-4", Attrs: uiutils.Attrs("data-slot", "facts")}}) {
					for _, vF := range uiutils.L(vFacts) {
						@compose.Stack(compose.StackProps{Gap: "4", BoxProps: box.BoxProps{Class: "rounded bg-card inset-ring inset-ring-border p-6", Attrs: uiutils.Attrs("data-slot", "fact")}}) {
							@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: "2", 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: "sm", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
									{ uiutils.Text(uiutils.Get(vF, "text")) }
								}
							}
						}
					}
				}
			}
			if uiutils.T(uiutils.And(!uiutils.Eq(vLayout, "facts"), uiutils.Gt(uiutils.Len(vZones), float64(0)))) {
				@compose.Stack(compose.StackProps{Gap: "4", Align: "stretch", BoxProps: box.BoxProps{}}) {
					@compose.Title(compose.TitleProps{As: "3", Size: "lg", Weight: "bold", TextProps: text.TextProps{}}) {
						{ uiutils.Text(uiutils.Get(vLabels, "zones")) }
					}
					@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "split")), "flex flex-col gap-4", "grid grid-cols-1 gap-4 md:grid-cols-3"))}}) {
						for _, vZ := range uiutils.L(vZones) {
							@compose.Stack(compose.StackProps{Gap: "2", BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "split")), "border-b border-border pb-4", "rounded bg-card inset-ring inset-ring-border p-6")), Attrs: uiutils.Attrs("data-slot", "zone")}}) {
								@compose.Group(compose.GroupProps{Gap: "4", Align: "baseline", Justify: "between", BoxProps: box.BoxProps{}}) {
									@compose.Text(compose.TextProps{Size: "sm", Weight: "semibold", TextProps: text.TextProps{}}) {
										{ uiutils.Text(uiutils.Get(vZ, "name")) }
									}
									@compose.Badge(compose.BadgeProps{Variant: "secondary", Size: "default", TextProps: text.TextProps{}}) {
										{ uiutils.Text(uiutils.Get(vZ, "time")) }
									}
								}
								@compose.Text(compose.TextProps{Size: "sm", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
									{ uiutils.Text(uiutils.Get(vZ, "area")) }
								}
								@compose.Text(compose.TextProps{Size: "sm", Weight: "medium", TextProps: text.TextProps{}}) {
									{ uiutils.Text(uiutils.Tpl(uiutils.Get(vLabels, "freeFrom"), uiutils.Money(uiutils.Get(vZ, "freeFrom"), uiutils.Get(vZ, "currency")))) }
								}
							}
						}
					}
				}
			}
		}
	}
}

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 delivery-info
blocks/delivery-info.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/delivery-info.json
    How delivery works: the facts as icon cards, then the zones with their time and the order that ships free. Axes: layout (full: facts over zone cards, facts: the facts only, split: the facts beside a list of zones), tone, density.
    Props (p): id, title, lead, facts, zones, labels, layout, tone, density, landmarkLabel. -#}
{%- set v_id = (p.id ?? null) -%}
{%- set v_title = (p.title ?? null) -%}
{%- set v_lead = (p.lead ?? '') -%}
{%- set v_facts = (p.facts ?? null) -%}
{%- set v_zones = (p.zones ?? null) -%}
{%- set v_labels = (p.labels ?? null) -%}
{%- set v_layout = (p.layout ?? 'full') -%}
{%- set v_tone = (p.tone ?? 'default') -%}
{%- set v_density = (p.density ?? 'default') -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- set c_17 -%}
  {%- set c_16 -%}
    {%- if og_t(og_gt(og_len(v_facts), 0)) %}
      {%- set c_6 -%}
        {%- for v_f in og_l(v_facts) %}
          {%- set c_5 -%}
            {%- set c_1 -%}
              {{ 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_1}, with_context = false) }}
            {%- set c_4 -%}
              {%- set c_2 -%}
                {{ og_text(og_get(v_f, ['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_f, ['text'])) }}
              {%- endset -%}
              {{ include('compose/Text.html.twig', {'size': 'sm', 'class': 'text-muted-foreground', 'children': c_3}, with_context = false) }}
            {%- endset -%}
            {{ include('compose/Stack.html.twig', {'gap': '2', 'children': c_4}, with_context = false) }}
          {%- endset -%}
          {{ include('compose/Stack.html.twig', {'gap': '4', 'class': 'rounded bg-card inset-ring inset-ring-border p-6', 'attrs': og_attrs(['data-slot', 'fact']), 'children': c_5}, with_context = false) }}
        {%- endfor %}
      {%- endset -%}
      {{ include('compose/Grid.html.twig', {'cols': og_s((og_t(og_eq(v_layout, 'split')) ? '1-2' : '1-4')), 'class': 'gap-4', 'attrs': og_attrs(['data-slot', 'facts']), 'children': c_6}, with_context = false) }}
    {%- endif %}
    {%- if og_t(og_and([not (og_eq(v_layout, 'facts')), og_gt(og_len(v_zones), 0)])) %}
      {%- set c_15 -%}
        {%- set c_7 -%}
          {{ og_text(og_get(v_labels, ['zones'])) }}
        {%- endset -%}
        {{ include('compose/Title.html.twig', {'as': 3, 'size': 'lg', 'weight': 'bold', 'children': c_7}, with_context = false) }}
        {%- set c_14 -%}
          {%- for v_z in og_l(v_zones) %}
            {%- set c_13 -%}
              {%- set c_10 -%}
                {%- set c_8 -%}
                  {{ og_text(og_get(v_z, ['name'])) }}
                {%- endset -%}
                {{ include('compose/Text.html.twig', {'size': 'sm', 'weight': 'semibold', 'children': c_8}, with_context = false) }}
                {%- set c_9 -%}
                  {{ og_text(og_get(v_z, ['time'])) }}
                {%- endset -%}
                {{ include('compose/Badge.html.twig', {'variant': 'secondary', 'size': 'default', 'children': c_9}, with_context = false) }}
              {%- endset -%}
              {{ include('compose/Group.html.twig', {'gap': '4', 'align': 'baseline', 'justify': 'between', 'children': c_10}, with_context = false) }}
              {%- set c_11 -%}
                {{ og_text(og_get(v_z, ['area'])) }}
              {%- endset -%}
              {{ include('compose/Text.html.twig', {'size': 'sm', 'class': 'text-muted-foreground', 'children': c_11}, with_context = false) }}
              {%- set c_12 -%}
                {{ og_text(og_tpl(og_get(v_labels, ['freeFrom']), [og_money(og_get(v_z, ['freeFrom']), og_get(v_z, ['currency']))])) }}
              {%- endset -%}
              {{ include('compose/Text.html.twig', {'size': 'sm', 'weight': 'medium', 'children': c_12}, with_context = false) }}
            {%- endset -%}
            {{ include('compose/Stack.html.twig', {'gap': '2', 'class': og_s((og_t(og_eq(v_layout, 'split')) ? 'border-b border-border pb-4' : 'rounded bg-card inset-ring inset-ring-border p-6')), 'attrs': og_attrs(['data-slot', 'zone']), 'children': c_13}, with_context = false) }}
          {%- endfor %}
        {%- endset -%}
        {{ include('compose/Box.html.twig', {'class': og_s((og_t(og_eq(v_layout, 'split')) ? 'flex flex-col gap-4' : 'grid grid-cols-1 gap-4 md:grid-cols-3')), 'children': c_14}, with_context = false) }}
      {%- endset -%}
      {{ include('compose/Stack.html.twig', {'gap': '4', 'align': 'stretch', 'children': c_15}, with_context = false) }}
    {%- endif %}
  {%- endset -%}
  {{ include('compose/Box.html.twig', {'class': og_s(og_cnv(['grid grid-cols-1 gap-8', (og_t(og_eq(v_layout, 'split')) ? 'items-start md:grid-cols-2' : '')])), 'children': c_16}, with_context = false) }}
{%- endset -%}
{{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'tone': v_tone, 'density': v_density, 'landmarkLabel': v_landmarkLabel}, 'children': og_markup(c_17)}, 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 delivery-info
blocks/delivery-info.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/delivery-info.json
    How delivery works: the facts as icon cards, then the zones with their time and the order that ships free. Axes: layout (full: facts over zone cards, facts: the facts only, split: the facts beside a list of zones), tone, density.
    Props (p): id, title, lead, facts, zones, labels, layout, tone, density, landmarkLabel. *}
{var $v_id = ($p['id'] ?? null)}
{var $v_title = ($p['title'] ?? null)}
{var $v_lead = ($p['lead'] ?? '')}
{var $v_facts = ($p['facts'] ?? null)}
{var $v_zones = ($p['zones'] ?? null)}
{var $v_labels = ($p['labels'] ?? null)}
{var $v_layout = ($p['layout'] ?? 'full')}
{var $v_tone = ($p['tone'] ?? 'default')}
{var $v_density = ($p['density'] ?? 'default')}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{capture $c_17}
  {capture $c_16}
    {if og_t(og_gt(og_len($v_facts), 0))}
      {capture $c_6}
        {foreach og_l($v_facts) as $v_f}
          {capture $c_5}
            {capture $c_1}
              {=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_1])|noescape}
            {capture $c_4}
              {capture $c_2}
                {=og_text(og_get($v_f, ['title']))}
              {/capture}
              {=og_include('compose/Text.latte', ['size' => 'sm', 'weight' => 'semibold', 'children' => (string) $c_2])|noescape}
              {capture $c_3}
                {=og_text(og_get($v_f, ['text']))}
              {/capture}
              {=og_include('compose/Text.latte', ['size' => 'sm', 'class' => 'text-muted-foreground', 'children' => (string) $c_3])|noescape}
            {/capture}
            {=og_include('compose/Stack.latte', ['gap' => '2', 'children' => (string) $c_4])|noescape}
          {/capture}
          {=og_include('compose/Stack.latte', ['gap' => '4', 'class' => 'rounded bg-card inset-ring inset-ring-border p-6', 'attrs' => og_attrs(['data-slot', 'fact']), 'children' => (string) $c_5])|noescape}
        {/foreach}
      {/capture}
      {=og_include('compose/Grid.latte', ['cols' => og_s((og_t(og_eq($v_layout, 'split')) ? '1-2' : '1-4')), 'class' => 'gap-4', 'attrs' => og_attrs(['data-slot', 'facts']), 'children' => (string) $c_6])|noescape}
    {/if}
    {if og_t(og_and([!(og_eq($v_layout, 'facts')), og_gt(og_len($v_zones), 0)]))}
      {capture $c_15}
        {capture $c_7}
          {=og_text(og_get($v_labels, ['zones']))}
        {/capture}
        {=og_include('compose/Title.latte', ['as' => 3, 'size' => 'lg', 'weight' => 'bold', 'children' => (string) $c_7])|noescape}
        {capture $c_14}
          {foreach og_l($v_zones) as $v_z}
            {capture $c_13}
              {capture $c_10}
                {capture $c_8}
                  {=og_text(og_get($v_z, ['name']))}
                {/capture}
                {=og_include('compose/Text.latte', ['size' => 'sm', 'weight' => 'semibold', 'children' => (string) $c_8])|noescape}
                {capture $c_9}
                  {=og_text(og_get($v_z, ['time']))}
                {/capture}
                {=og_include('compose/Badge.latte', ['variant' => 'secondary', 'size' => 'default', 'children' => (string) $c_9])|noescape}
              {/capture}
              {=og_include('compose/Group.latte', ['gap' => '4', 'align' => 'baseline', 'justify' => 'between', 'children' => (string) $c_10])|noescape}
              {capture $c_11}
                {=og_text(og_get($v_z, ['area']))}
              {/capture}
              {=og_include('compose/Text.latte', ['size' => 'sm', 'class' => 'text-muted-foreground', 'children' => (string) $c_11])|noescape}
              {capture $c_12}
                {=og_text(og_tpl(og_get($v_labels, ['freeFrom']), [og_money(og_get($v_z, ['freeFrom']), og_get($v_z, ['currency']))]))}
              {/capture}
              {=og_include('compose/Text.latte', ['size' => 'sm', 'weight' => 'medium', 'children' => (string) $c_12])|noescape}
            {/capture}
            {=og_include('compose/Stack.latte', ['gap' => '2', 'class' => og_s((og_t(og_eq($v_layout, 'split')) ? 'border-b border-border pb-4' : 'rounded bg-card inset-ring inset-ring-border p-6')), 'attrs' => og_attrs(['data-slot', 'zone']), 'children' => (string) $c_13])|noescape}
          {/foreach}
        {/capture}
        {=og_include('compose/Box.latte', ['class' => og_s((og_t(og_eq($v_layout, 'split')) ? 'flex flex-col gap-4' : 'grid grid-cols-1 gap-4 md:grid-cols-3')), 'children' => (string) $c_14])|noescape}
      {/capture}
      {=og_include('compose/Stack.latte', ['gap' => '4', 'align' => 'stretch', 'children' => (string) $c_15])|noescape}
    {/if}
  {/capture}
  {=og_include('compose/Box.latte', ['class' => og_s(og_cnv(['grid grid-cols-1 gap-8', (og_t(og_eq($v_layout, 'split')) ? 'items-start md:grid-cols-2' : '')])), 'children' => (string) $c_16])|noescape}
{/capture}
{=og_include('blocks/section-frame.latte', ['p' => ['id' => $v_id, 'title' => $v_title, 'lead' => $v_lead, 'tone' => $v_tone, 'density' => $v_density, 'landmarkLabel' => $v_landmarkLabel], 'children' => og_markup($c_17)])|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 delivery-info
blocks/delivery-info.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/delivery-info.json
    How delivery works: the facts as icon cards, then the zones with their time and the order that ships free. Axes: layout (full: facts over zone cards, facts: the facts only, split: the facts beside a list of zones), tone, density.
    Props (p): id, title, lead, facts, zones, labels, layout, tone, density, 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_facts = og_def(p['facts'], none) -%}
{%- set v_zones = og_def(p['zones'], none) -%}
{%- set v_labels = og_def(p['labels'], none) -%}
{%- set v_layout = og_def(p['layout'], 'full') -%}
{%- 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_17 -%}
  {%- set c_16 -%}
    {%- if og_t(og_gt(og_len(v_facts), 0)) %}
      {%- set c_6 -%}
        {%- for v_f in og_l(v_facts) %}
          {%- set c_5 -%}
            {%- set c_1 -%}
              {{ 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_1}) }}
            {%- set c_4 -%}
              {%- set c_2 -%}
                {{ og_text(og_get(v_f, ['title'])) }}
              {%- endset -%}
              {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_2}) }}
              {%- set c_3 -%}
                {{ og_text(og_get(v_f, ['text'])) }}
              {%- endset -%}
              {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_3}) }}
            {%- endset -%}
            {{ og_include('compose/stack.html.j2', {'p': {'Gap': '2'}, 'children': c_4}) }}
          {%- endset -%}
          {{ og_include('compose/stack.html.j2', {'p': {'Gap': '4', 'Class': 'rounded bg-card inset-ring inset-ring-border p-6', 'Attrs': og_attrs(['data-slot', 'fact'])}, 'children': c_5}) }}
        {%- endfor %}
      {%- endset -%}
      {{ og_include('compose/grid.html.j2', {'p': {'Cols': og_s(('1-2' if og_t(og_eq(v_layout, 'split')) else '1-4')), 'Class': 'gap-4', 'Attrs': og_attrs(['data-slot', 'facts'])}, 'children': c_6}) }}
    {%- endif %}
    {%- if og_t(og_and([not (og_eq(v_layout, 'facts')), og_gt(og_len(v_zones), 0)])) %}
      {%- set c_15 -%}
        {%- set c_7 -%}
          {{ og_text(og_get(v_labels, ['zones'])) }}
        {%- endset -%}
        {{ og_include('compose/title.html.j2', {'p': {'As': 3, 'Size': 'lg', 'Weight': 'bold'}, 'children': c_7}) }}
        {%- set c_14 -%}
          {%- for v_z in og_l(v_zones) %}
            {%- set c_13 -%}
              {%- set c_10 -%}
                {%- set c_8 -%}
                  {{ og_text(og_get(v_z, ['name'])) }}
                {%- endset -%}
                {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_8}) }}
                {%- set c_9 -%}
                  {{ og_text(og_get(v_z, ['time'])) }}
                {%- endset -%}
                {{ og_include('compose/badge.html.j2', {'p': {'Variant': 'secondary', 'Size': 'default'}, 'children': c_9}) }}
              {%- endset -%}
              {{ og_include('compose/group.html.j2', {'p': {'Gap': '4', 'Align': 'baseline', 'Justify': 'between'}, 'children': c_10}) }}
              {%- set c_11 -%}
                {{ og_text(og_get(v_z, ['area'])) }}
              {%- endset -%}
              {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_11}) }}
              {%- set c_12 -%}
                {{ og_text(og_tpl(og_get(v_labels, ['freeFrom']), [og_money(og_get(v_z, ['freeFrom']), og_get(v_z, ['currency']))])) }}
              {%- endset -%}
              {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'medium'}, 'children': c_12}) }}
            {%- endset -%}
            {{ og_include('compose/stack.html.j2', {'p': {'Gap': '2', 'Class': og_s(('border-b border-border pb-4' if og_t(og_eq(v_layout, 'split')) else 'rounded bg-card inset-ring inset-ring-border p-6')), 'Attrs': og_attrs(['data-slot', 'zone'])}, 'children': c_13}) }}
          {%- endfor %}
        {%- endset -%}
        {{ og_include('compose/box.html.j2', {'p': {'Class': og_s(('flex flex-col gap-4' if og_t(og_eq(v_layout, 'split')) else 'grid grid-cols-1 gap-4 md:grid-cols-3'))}, 'children': c_14}) }}
      {%- endset -%}
      {{ og_include('compose/stack.html.j2', {'p': {'Gap': '4', 'Align': 'stretch'}, 'children': c_15}) }}
    {%- endif %}
  {%- endset -%}
  {{ og_include('compose/box.html.j2', {'p': {'Class': og_s(og_cnv(['grid grid-cols-1 gap-8', ('items-start md:grid-cols-2' if og_t(og_eq(v_layout, 'split')) else '')]))}, 'children': c_16}) }}
{%- endset -%}
{{ og_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'tone': v_tone, 'density': v_density, 'landmarkLabel': v_landmarkLabel}, 'children': og_markup(c_17)}) }}

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.

How delivery works: the facts as icon cards, then the zones with their time and the order that ships free. Axes: layout (full: facts over zone cards, facts: the facts only, split: the facts beside a list of zones), tone, density.

Props of DeliveryInfo
PropTypeDefault Description
id (required)string-
title (required)string-
lead string""
facts (required)Feature[]-
zones (required)Zone[]-
labels (required)DeliveryLabels-
layout "full" | "facts" | "split""full"
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