Skip to content
ui8kit

block / marketing

Team Grid

The people of a team as cards, a minimal grid, detailed cards, rows beside a picture or a directory.

Install

npx ui8kit add team-grid

Pulls in: box, compose, empty-state, kit-box, kit-text, media-frame, member-row, section-frame, stack, text, utils

Preview

The people behind the product

A small team in six cities, working in the open.

Ava Moreno

Founder and CEO

Started the company after ten years of building tools for other teams.

Noah Becker

Head of Engineering

Keeps the build fast and the releases boring.

Mia Laurent

Design Lead

Draws the system before anyone writes a line of code.

Liam Okafor

Product Manager

Talks to customers every week and writes it all down.

Zoe Tanaka

Frontend Engineer

Owns the component library and its tests.

Omar Haddad

Customer Success

Turns tricky tickets into fixes and guides.

Elena Rossi

Brand Designer

Makes the pages, the slides and the swag look like one brand.

Sam Carter

Backend Engineer

Builds the APIs and keeps the database happy.

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 team-grid
blocks/team-grid.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 people of a team: portrait cards, a minimal grid of small portraits, detailed cards with skills, rows
  beside a picture, or a directory of two columns. Axes: layout (cards, minimal, detailed, list, directory),
  cols, tone, density.
-->
<script lang="ts" module>
  import type { Snippet } from "svelte";
  import type { Member } from "./team-grid.types";

  export type TeamGridProps = {
    id: string;
    title: string;
    lead?: string;
    members: Member[];
    empty?: string;
    depts: Record<string, string>;
    layout?: "cards" | "minimal" | "detailed" | "list" | "directory";
    cols?: "1-3" | "1-4";
    tone?: "default" | "muted";
    density?: "default" | "compact";
    image?: string;
    imageAlt?: string;
    landmarkLabel?: string;
  };
</script>

<script lang="ts">
  import Box from "../compose/Box.svelte";
  import Stack from "../compose/Stack.svelte";
  import Text from "../compose/Text.svelte";
  import EmptyState from "../components/empty-state.svelte";
  import MediaFrame from "../components/media-frame.svelte";
  import MemberRow from "../components/member-row.svelte";
  import SectionFrame from "../components/section-frame.svelte";
  import { cn } from "../utils";

  let {
    id,
    title,
    lead = "",
    members,
    empty = "",
    depts,
    layout = "cards",
    cols = "1-4",
    tone = "default",
    density = "default",
    image,
    imageAlt,
    landmarkLabel,
  }: TeamGridProps = $props();
</script>

<SectionFrame
  id={id}
  title={title}
  lead={lead}
  tone={tone}
  density={density}
  layout={(((layout as string) === "list") ? "split" : "stack")}
  media={{ show: ((layout as string) === "list"), side: "start", align: "start" }}
  landmarkLabel={landmarkLabel}
>
  {#if ((members?.length ?? 0) === 0)}
    <EmptyState icon="users" title={empty} />
  {:else}
    <Box
      class={
        (layout as string) === "minimal" ? "grid grid-cols-2 gap-8 md:grid-cols-4"
        : (layout as string) === "directory" ? "grid grid-cols-1 gap-4 md:grid-cols-2"
        : (layout as string) === "list" ? "flex flex-col gap-4"
        : (cols as string) === "1-3" ? "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3"
        : "grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-4"
      }
      data-slot="items"
    >
      {#each members as m (m.id)}
        {#if ((layout as string) === "minimal")}
          <Stack gap="2" align="center" class="text-center" data-slot="item">
            <MediaFrame alt={m.name} src={m.image} ratio="1/1" class={cn("size-16", "shrink-0")} />
            <Text size="sm" weight="semibold">
              {m.name}
            </Text>
            <Text size="xs" class="text-muted-foreground">
              {m.role}
            </Text>
          </Stack>
        {:else if ((layout as string) === "cards")}
          <Stack gap="4" class="rounded bg-card inset-ring inset-ring-border p-4" data-slot="item">
            <MediaFrame alt={m.name} src={m.image} ratio="1/1" />
            <Stack gap="2">
              <Stack gap="0">
                <Text size="base" weight="semibold">
                  {m.name}
                </Text>
                <Text size="sm" class="text-muted-foreground">
                  {m.role}
                </Text>
              </Stack>
              <Text size="sm" class="text-muted-foreground">
                {m.bio}
              </Text>
            </Stack>
          </Stack>
        {:else}
          <MemberRow member={m} depts={depts} layout={layout} />
        {/if}
      {/each}
    </Box>
  {/if}
  {#snippet aside()}
    <MediaFrame alt={(imageAlt ? imageAlt : title)} src={image} ratio="3/4" />
  {/snippet}
</SectionFrame>
blocks/team-grid.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 Member = {
  id: string;
  name: string;
  role: string;
  dept: string;
  location: string;
  bio: string;
  skills: string[];
  image?: 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 team-grid
blocks/team-grid.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 people of a team: portrait cards, a minimal grid of small portraits, detailed cards with skills, rows
 * beside a picture, or a directory of two columns. Axes: layout (cards, minimal, detailed, list, directory),
 * cols, tone, density.
 */
import { Fragment, type ReactNode } from "react";
import { Box, Stack, Text } from "../compose";
import { EmptyState } from "../components/empty-state";
import { MediaFrame } from "../components/media-frame";
import { MemberRow } from "../components/member-row";
import { SectionFrame } from "../components/section-frame";
import { cn } from "../utils";
import type { Member } from "./team-grid.types";

export type TeamGridProps = {
  id: string;
  title: string;
  lead?: string;
  members: Member[];
  empty?: string;
  depts: Record<string, string>;
  layout?: "cards" | "minimal" | "detailed" | "list" | "directory";
  cols?: "1-3" | "1-4";
  tone?: "default" | "muted";
  density?: "default" | "compact";
  image?: string;
  imageAlt?: string;
  landmarkLabel?: string;
};

export function TeamGrid({
  id,
  title,
  lead = "",
  members,
  empty = "",
  depts,
  layout = "cards",
  cols = "1-4",
  tone = "default",
  density = "default",
  image,
  imageAlt,
  landmarkLabel,
}: TeamGridProps) {
  return (
    <SectionFrame
      id={id}
      title={title}
      lead={lead}
      tone={tone}
      density={density}
      layout={(((layout as string) === "list") ? "split" : "stack")}
      media={{ show: ((layout as string) === "list"), side: "start", align: "start" }}
      landmarkLabel={landmarkLabel}
      aside={(
        <MediaFrame alt={(imageAlt ? imageAlt : title)} src={image} ratio="3/4" />
      )}
    >
      {((members?.length ?? 0) === 0) ? (
        <EmptyState icon="users" title={empty} />
      ) : (
        <Box
          className={
            (layout as string) === "minimal" ? "grid grid-cols-2 gap-8 md:grid-cols-4"
            : (layout as string) === "directory" ? "grid grid-cols-1 gap-4 md:grid-cols-2"
            : (layout as string) === "list" ? "flex flex-col gap-4"
            : (cols as string) === "1-3" ? "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3"
            : "grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-4"
          }
          data-slot="items"
        >
          {(members ?? []).map((m) => (
            <Fragment key={m.id}>
              {((layout as string) === "minimal") ? (
                <Stack gap="2" align="center" className="text-center" data-slot="item">
                  <MediaFrame alt={m.name} src={m.image} ratio="1/1" className={cn("size-16", "shrink-0")} />
                  <Text size="sm" weight="semibold">
                    {m.name}
                  </Text>
                  <Text size="xs" className="text-muted-foreground">
                    {m.role}
                  </Text>
                </Stack>
              ) : ((layout as string) === "cards") ? (
                <Stack gap="4" className="rounded bg-card inset-ring inset-ring-border p-4" data-slot="item">
                  <MediaFrame alt={m.name} src={m.image} ratio="1/1" />
                  <Stack gap="2">
                    <Stack gap="0">
                      <Text size="base" weight="semibold">
                        {m.name}
                      </Text>
                      <Text size="sm" className="text-muted-foreground">
                        {m.role}
                      </Text>
                    </Stack>
                    <Text size="sm" className="text-muted-foreground">
                      {m.bio}
                    </Text>
                  </Stack>
                </Stack>
              ) : (
                <MemberRow member={m} depts={depts} layout={layout} />
              )}
            </Fragment>
          ))}
        </Box>
      )}
    </SectionFrame>
  );
}
blocks/team-grid.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 Member = {
  id: string;
  name: string;
  role: string;
  dept: string;
  location: string;
  bio: string;
  skills: string[];
  image?: 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 team-grid
blocks/team-grid.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 Member = {
  id: string;
  name: string;
  role: string;
  dept: string;
  location: string;
  bio: string;
  skills: string[];
  image?: string;
};
blocks/team-grid.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 people of a team: portrait cards, a minimal grid of small portraits, detailed cards with skills, rows
  beside a picture, or a directory of two columns. Axes: layout (cards, minimal, detailed, list, directory),
  cols, tone, density.
-->
<script lang="ts">
import type { Member } from "./team-grid.types";

export type TeamGridProps = {
  id: string;
  title: string;
  lead?: string;
  members: Member[];
  empty?: string;
  depts: Record<string, string>;
  layout?: "cards" | "minimal" | "detailed" | "list" | "directory";
  cols?: "1-3" | "1-4";
  tone?: "default" | "muted";
  density?: "default" | "compact";
  image?: string;
  imageAlt?: string;
  landmarkLabel?: string;
};
</script>

<script setup lang="ts">
import Box from "../compose/Box.vue";
import Stack from "../compose/Stack.vue";
import Text from "../compose/Text.vue";
import EmptyState from "../components/empty-state.vue";
import MediaFrame from "../components/media-frame.vue";
import MemberRow from "../components/member-row.vue";
import SectionFrame from "../components/section-frame.vue";
import { cn } from "../utils";

const {
  id,
  title,
  lead = "",
  members,
  empty = "",
  depts,
  layout = "cards",
  cols = "1-4",
  tone = "default",
  density = "default",
  image,
  imageAlt,
  landmarkLabel,
} = defineProps<TeamGridProps>();
</script>

<template>
  <SectionFrame
    :id="id"
    :title="title"
    :lead="lead"
    :tone="tone"
    :density="density"
    :layout="(((layout as string) === 'list') ? 'split' : 'stack')"
    :media="{ show: ((layout as string) === 'list'), side: 'start', align: 'start' }"
    :landmarkLabel="landmarkLabel"
  >
    <EmptyState v-if="((members?.length ?? 0) === 0)" icon="users" :title="empty" />
    <Box v-else
      :class="
        (layout as string) === 'minimal' ? 'grid grid-cols-2 gap-8 md:grid-cols-4'
        : (layout as string) === 'directory' ? 'grid grid-cols-1 gap-4 md:grid-cols-2'
        : (layout as string) === 'list' ? 'flex flex-col gap-4'
        : (cols as string) === '1-3' ? 'grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3'
        : 'grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-4'
      "
      data-slot="items"
    >
      <template v-for="m in members" :key="m.id">
        <Stack v-if="((layout as string) === 'minimal')" gap="2" align="center" class="text-center" data-slot="item">
          <MediaFrame :alt="m.name" :src="m.image" ratio="1/1" :class="cn('size-16', 'shrink-0')" />
          <Text size="sm" weight="semibold">
            {{ m.name }}
          </Text>
          <Text size="xs" class="text-muted-foreground">
            {{ m.role }}
          </Text>
        </Stack>
        <Stack
          v-else-if="((layout as string) === 'cards')"
          gap="4"
          class="rounded bg-card inset-ring inset-ring-border p-4"
          data-slot="item"
        >
          <MediaFrame :alt="m.name" :src="m.image" ratio="1/1" />
          <Stack gap="2">
            <Stack gap="0">
              <Text size="base" weight="semibold">
                {{ m.name }}
              </Text>
              <Text size="sm" class="text-muted-foreground">
                {{ m.role }}
              </Text>
            </Stack>
            <Text size="sm" class="text-muted-foreground">
              {{ m.bio }}
            </Text>
          </Stack>
        </Stack>
        <MemberRow v-else :member="m" :depts="depts" :layout="layout" />
      </template>
    </Box>
    <template #aside>
      <MediaFrame :alt="(imageAlt ? imageAlt : title)" :src="image" ratio="3/4" />
    </template>
  </SectionFrame>
</template>

Vue registry item (JSON)

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

npx ui8kit init --yes --framework solid --dir src --registry-url https://registry.buildy.tw/solid --strict-cdn
npx ui8kit add team-grid
blocks/team-grid.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 people of a team: portrait cards, a minimal grid of small portraits, detailed cards with skills, rows
 * beside a picture, or a directory of two columns. Axes: layout (cards, minimal, detailed, list, directory),
 * cols, tone, density.
 */
import { For, type JSX } from "solid-js";
import { Box, Stack, Text } from "../compose";
import { EmptyState } from "../components/empty-state";
import { MediaFrame } from "../components/media-frame";
import { MemberRow } from "../components/member-row";
import { SectionFrame } from "../components/section-frame";
import { cn } from "../utils";
import type { Member } from "./team-grid.types";

export type TeamGridProps = {
  id: string;
  title: string;
  lead?: string;
  members: Member[];
  empty?: string;
  depts: Record<string, string>;
  layout?: "cards" | "minimal" | "detailed" | "list" | "directory";
  cols?: "1-3" | "1-4";
  tone?: "default" | "muted";
  density?: "default" | "compact";
  image?: string;
  imageAlt?: string;
  landmarkLabel?: string;
};

export function TeamGrid({
  id,
  title,
  lead = "",
  members,
  empty = "",
  depts,
  layout = "cards",
  cols = "1-4",
  tone = "default",
  density = "default",
  image,
  imageAlt,
  landmarkLabel,
}: TeamGridProps) {
  return (
    <SectionFrame
      id={id}
      title={title}
      lead={lead}
      tone={tone}
      density={density}
      layout={(((layout as string) === "list") ? "split" : "stack")}
      media={{ show: ((layout as string) === "list"), side: "start", align: "start" }}
      landmarkLabel={landmarkLabel}
      aside={(
        <MediaFrame alt={(imageAlt ? imageAlt : title)} src={image} ratio="3/4" />
      )}
    >
      {((members?.length ?? 0) === 0) ? (
        <EmptyState icon="users" title={empty} />
      ) : (
        <Box
          class={
            (layout as string) === "minimal" ? "grid grid-cols-2 gap-8 md:grid-cols-4"
            : (layout as string) === "directory" ? "grid grid-cols-1 gap-4 md:grid-cols-2"
            : (layout as string) === "list" ? "flex flex-col gap-4"
            : (cols as string) === "1-3" ? "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3"
            : "grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-4"
          }
          data-slot="items"
        >
          <For each={members ?? []}>{(m) => (
            <>
              {((layout as string) === "minimal") ? (
                <Stack gap="2" align="center" class="text-center" data-slot="item">
                  <MediaFrame alt={m.name} src={m.image} ratio="1/1" class={cn("size-16", "shrink-0")} />
                  <Text size="sm" weight="semibold">
                    {m.name}
                  </Text>
                  <Text size="xs" class="text-muted-foreground">
                    {m.role}
                  </Text>
                </Stack>
              ) : ((layout as string) === "cards") ? (
                <Stack gap="4" class="rounded bg-card inset-ring inset-ring-border p-4" data-slot="item">
                  <MediaFrame alt={m.name} src={m.image} ratio="1/1" />
                  <Stack gap="2">
                    <Stack gap="0">
                      <Text size="base" weight="semibold">
                        {m.name}
                      </Text>
                      <Text size="sm" class="text-muted-foreground">
                        {m.role}
                      </Text>
                    </Stack>
                    <Text size="sm" class="text-muted-foreground">
                      {m.bio}
                    </Text>
                  </Stack>
                </Stack>
              ) : (
                <MemberRow member={m} depts={depts} layout={layout} />
              )}
            </>
          )}</For>
        </Box>
      )}
    </SectionFrame>
  );
}
blocks/team-grid.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 Member = {
  id: string;
  name: string;
  role: string;
  dept: string;
  location: string;
  bio: string;
  skills: string[];
  image?: 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 team-grid
blocks/team-grid.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/team-grid.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/ui/text"
	uiutils "github.com/ui8kit/codegen/generated/templ/orgutils"
)

// TeamGridProps are the props of TeamGrid; the values are the JSON shapes of the TypeScript props.
type TeamGridProps struct {
	Id any `json:"id"`
	Title any `json:"title"`
	Lead any `json:"lead"`
	Members any `json:"members"`
	Empty any `json:"empty"`
	Depts any `json:"depts"`
	Layout any `json:"layout"`
	Cols any `json:"cols"`
	Tone any `json:"tone"`
	Density any `json:"density"`
	Image any `json:"image"`
	ImageAlt any `json:"imageAlt"`
	LandmarkLabel any `json:"landmarkLabel"`
}

// The people of a team: portrait cards, a minimal grid of small portraits, detailed cards with skills, rows beside a picture, or a directory of two columns. Axes: layout (cards, minimal, detailed, list, directory), cols, tone, density.
templ TeamGrid(p TeamGridProps) {
	{{ vId := p.Id }}
	{{ vTitle := p.Title }}
	{{ vLead := uiutils.Def(p.Lead, "") }}
	{{ vMembers := p.Members }}
	{{ vEmpty := uiutils.Def(p.Empty, "") }}
	{{ vDepts := p.Depts }}
	{{ vLayout := uiutils.Def(p.Layout, "cards") }}
	{{ vCols := uiutils.Def(p.Cols, "1-4") }}
	{{ vTone := uiutils.Def(p.Tone, "default") }}
	{{ vDensity := uiutils.Def(p.Density, "default") }}
	{{ vImage := p.Image }}
	{{ vImageAlt := p.ImageAlt }}
	{{ vLandmarkLabel := p.LandmarkLabel }}
	@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Lead: vLead, Tone: vTone, Density: vDensity, Layout: uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "list")), "split", "stack"), Media: map[string]any{"show": uiutils.Eq(vLayout, "list"), "side": "start", "align": "start"}, LandmarkLabel: vLandmarkLabel, Aside: teamGridFill1(p, vTitle, vImage, vImageAlt)}) {
		if uiutils.Eq(uiutils.Len(vMembers), float64(0)) {
			@EmptyState(EmptyStateProps{Icon: "users", Title: vEmpty})
		} else {
			@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "minimal")), "grid grid-cols-2 gap-8 md:grid-cols-4", uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "directory")), "grid grid-cols-1 gap-4 md:grid-cols-2", uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "list")), "flex flex-col gap-4", uiutils.Cond(uiutils.T(uiutils.Eq(vCols, "1-3")), "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", "grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-4"))))), Attrs: uiutils.Attrs("data-slot", "items")}}) {
				for _, vM := range uiutils.L(vMembers) {
					if uiutils.Eq(vLayout, "minimal") {
						@compose.Stack(compose.StackProps{Gap: "2", Align: "center", BoxProps: box.BoxProps{Class: "text-center", Attrs: uiutils.Attrs("data-slot", "item")}}) {
							@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vM, "name"), Src: uiutils.Get(vM, "image"), Ratio: "1/1", Class: uiutils.Cnv(uiutils.Cnv("size-16", "shrink-0"))})
							@compose.Text(compose.TextProps{Size: "sm", Weight: "semibold", TextProps: text.TextProps{}}) {
								{ uiutils.Text(uiutils.Get(vM, "name")) }
							}
							@compose.Text(compose.TextProps{Size: "xs", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
								{ uiutils.Text(uiutils.Get(vM, "role")) }
							}
						}
					} else if uiutils.Eq(vLayout, "cards") {
						@compose.Stack(compose.StackProps{Gap: "4", BoxProps: box.BoxProps{Class: "rounded bg-card inset-ring inset-ring-border p-4", Attrs: uiutils.Attrs("data-slot", "item")}}) {
							@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vM, "name"), Src: uiutils.Get(vM, "image"), Ratio: "1/1"})
							@compose.Stack(compose.StackProps{Gap: "2", BoxProps: box.BoxProps{}}) {
								@compose.Stack(compose.StackProps{Gap: "0", BoxProps: box.BoxProps{}}) {
									@compose.Text(compose.TextProps{Size: "base", Weight: "semibold", TextProps: text.TextProps{}}) {
										{ uiutils.Text(uiutils.Get(vM, "name")) }
									}
									@compose.Text(compose.TextProps{Size: "sm", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
										{ uiutils.Text(uiutils.Get(vM, "role")) }
									}
								}
								@compose.Text(compose.TextProps{Size: "sm", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
									{ uiutils.Text(uiutils.Get(vM, "bio")) }
								}
							}
						}
					} else {
						@MemberRow(MemberRowProps{Member: vM, Depts: vDepts, Layout: vLayout})
					}
				}
			}
		}
	}
}

templ teamGridFill1(p TeamGridProps, vTitle any, vImage any, vImageAlt any) {
	@MediaFrame(MediaFrameProps{Alt: uiutils.Cond(uiutils.T(vImageAlt), vImageAlt, vTitle), Src: vImage, Ratio: "3/4"})
}

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 team-grid
blocks/team-grid.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/team-grid.json
    The people of a team: portrait cards, a minimal grid of small portraits, detailed cards with skills, rows beside a picture, or a directory of two columns. Axes: layout (cards, minimal, detailed, list, directory), cols, tone, density.
    Props (p): id, title, lead, members, empty, depts, layout, cols, tone, density, image, imageAlt, landmarkLabel. -#}
{%- set v_id = (p.id ?? null) -%}
{%- set v_title = (p.title ?? null) -%}
{%- set v_lead = (p.lead ?? '') -%}
{%- set v_members = (p.members ?? null) -%}
{%- set v_empty = (p.empty ?? '') -%}
{%- set v_depts = (p.depts ?? null) -%}
{%- set v_layout = (p.layout ?? 'cards') -%}
{%- set v_cols = (p.cols ?? '1-4') -%}
{%- set v_tone = (p.tone ?? 'default') -%}
{%- set v_density = (p.density ?? 'default') -%}
{%- set v_image = (p.image ?? null) -%}
{%- set v_imageAlt = (p.imageAlt ?? null) -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- set f_11 -%}
  {{ include('blocks/media-frame.html.twig', {'p': {'alt': (og_t(v_imageAlt) ? v_imageAlt : v_title), 'src': v_image, 'ratio': '3/4'}}, with_context = false) }}
{%- endset -%}
{%- set c_12 -%}
  {%- if og_t(og_eq(og_len(v_members), 0)) %}
    {{ include('blocks/empty-state.html.twig', {'p': {'icon': 'users', 'title': v_empty}}, with_context = false) }}
  {%- else %}
    {%- set c_10 -%}
      {%- for v_m in og_l(v_members) %}
        {%- if og_t(og_eq(v_layout, 'minimal')) %}
          {%- set c_3 -%}
            {{ include('blocks/media-frame.html.twig', {'p': {'alt': og_get(v_m, ['name']), 'src': og_get(v_m, ['image']), 'ratio': '1/1', 'className': og_cnv([og_cnv(['size-16', 'shrink-0'])])}}, with_context = false) }}
            {%- set c_1 -%}
              {{ og_text(og_get(v_m, ['name'])) }}
            {%- endset -%}
            {{ include('compose/Text.html.twig', {'size': 'sm', 'weight': 'semibold', 'children': c_1}, with_context = false) }}
            {%- set c_2 -%}
              {{ og_text(og_get(v_m, ['role'])) }}
            {%- 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': '2', 'align': 'center', 'class': 'text-center', 'attrs': og_attrs(['data-slot', 'item']), 'children': c_3}, with_context = false) }}
        {%- elseif og_t(og_eq(v_layout, 'cards')) %}
          {%- set c_9 -%}
            {{ include('blocks/media-frame.html.twig', {'p': {'alt': og_get(v_m, ['name']), 'src': og_get(v_m, ['image']), 'ratio': '1/1'}}, with_context = false) }}
            {%- set c_8 -%}
              {%- set c_6 -%}
                {%- set c_4 -%}
                  {{ og_text(og_get(v_m, ['name'])) }}
                {%- endset -%}
                {{ include('compose/Text.html.twig', {'size': 'base', 'weight': 'semibold', 'children': c_4}, with_context = false) }}
                {%- set c_5 -%}
                  {{ og_text(og_get(v_m, ['role'])) }}
                {%- endset -%}
                {{ include('compose/Text.html.twig', {'size': 'sm', 'class': 'text-muted-foreground', 'children': c_5}, with_context = false) }}
              {%- endset -%}
              {{ include('compose/Stack.html.twig', {'gap': '0', 'children': c_6}, with_context = false) }}
              {%- set c_7 -%}
                {{ og_text(og_get(v_m, ['bio'])) }}
              {%- endset -%}
              {{ include('compose/Text.html.twig', {'size': 'sm', 'class': 'text-muted-foreground', 'children': c_7}, with_context = false) }}
            {%- endset -%}
            {{ include('compose/Stack.html.twig', {'gap': '2', 'children': c_8}, with_context = false) }}
          {%- endset -%}
          {{ include('compose/Stack.html.twig', {'gap': '4', 'class': 'rounded bg-card inset-ring inset-ring-border p-4', 'attrs': og_attrs(['data-slot', 'item']), 'children': c_9}, with_context = false) }}
        {%- else %}
          {{ include('blocks/member-row.html.twig', {'p': {'member': v_m, 'depts': v_depts, 'layout': v_layout}}, with_context = false) }}
        {%- endif %}
      {%- endfor %}
    {%- endset -%}
    {{ include('compose/Box.html.twig', {'class': og_s((og_t(og_eq(v_layout, 'minimal')) ? 'grid grid-cols-2 gap-8 md:grid-cols-4' : (og_t(og_eq(v_layout, 'directory')) ? 'grid grid-cols-1 gap-4 md:grid-cols-2' : (og_t(og_eq(v_layout, 'list')) ? 'flex flex-col gap-4' : (og_t(og_eq(v_cols, '1-3')) ? 'grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3' : 'grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-4'))))), 'attrs': og_attrs(['data-slot', 'items']), 'children': c_10}, with_context = false) }}
  {%- endif %}
{%- endset -%}
{{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'tone': v_tone, 'density': v_density, 'layout': (og_t(og_eq(v_layout, 'list')) ? 'split' : 'stack'), 'media': {'show': og_eq(v_layout, 'list'), 'side': 'start', 'align': 'start'}, 'landmarkLabel': v_landmarkLabel, 'aside': og_markup(f_11)}, 'children': og_markup(c_12)}, 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 team-grid
blocks/team-grid.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/team-grid.json
    The people of a team: portrait cards, a minimal grid of small portraits, detailed cards with skills, rows beside a picture, or a directory of two columns. Axes: layout (cards, minimal, detailed, list, directory), cols, tone, density.
    Props (p): id, title, lead, members, empty, depts, layout, cols, tone, density, image, imageAlt, landmarkLabel. *}
{var $v_id = ($p['id'] ?? null)}
{var $v_title = ($p['title'] ?? null)}
{var $v_lead = ($p['lead'] ?? '')}
{var $v_members = ($p['members'] ?? null)}
{var $v_empty = ($p['empty'] ?? '')}
{var $v_depts = ($p['depts'] ?? null)}
{var $v_layout = ($p['layout'] ?? 'cards')}
{var $v_cols = ($p['cols'] ?? '1-4')}
{var $v_tone = ($p['tone'] ?? 'default')}
{var $v_density = ($p['density'] ?? 'default')}
{var $v_image = ($p['image'] ?? null)}
{var $v_imageAlt = ($p['imageAlt'] ?? null)}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{capture $f_11}
  {=og_include('blocks/media-frame.latte', ['p' => ['alt' => (og_t($v_imageAlt) ? $v_imageAlt : $v_title), 'src' => $v_image, 'ratio' => '3/4']])|noescape}
{/capture}
{capture $c_12}
  {if og_t(og_eq(og_len($v_members), 0))}
    {=og_include('blocks/empty-state.latte', ['p' => ['icon' => 'users', 'title' => $v_empty]])|noescape}
  {else}
    {capture $c_10}
      {foreach og_l($v_members) as $v_m}
        {if og_t(og_eq($v_layout, 'minimal'))}
          {capture $c_3}
            {=og_include('blocks/media-frame.latte', ['p' => ['alt' => og_get($v_m, ['name']), 'src' => og_get($v_m, ['image']), 'ratio' => '1/1', 'className' => og_cnv([og_cnv(['size-16', 'shrink-0'])])]])|noescape}
            {capture $c_1}
              {=og_text(og_get($v_m, ['name']))}
            {/capture}
            {=og_include('compose/Text.latte', ['size' => 'sm', 'weight' => 'semibold', 'children' => (string) $c_1])|noescape}
            {capture $c_2}
              {=og_text(og_get($v_m, ['role']))}
            {/capture}
            {=og_include('compose/Text.latte', ['size' => 'xs', 'class' => 'text-muted-foreground', 'children' => (string) $c_2])|noescape}
          {/capture}
          {=og_include('compose/Stack.latte', ['gap' => '2', 'align' => 'center', 'class' => 'text-center', 'attrs' => og_attrs(['data-slot', 'item']), 'children' => (string) $c_3])|noescape}
        {elseif og_t(og_eq($v_layout, 'cards'))}
          {capture $c_9}
            {=og_include('blocks/media-frame.latte', ['p' => ['alt' => og_get($v_m, ['name']), 'src' => og_get($v_m, ['image']), 'ratio' => '1/1']])|noescape}
            {capture $c_8}
              {capture $c_6}
                {capture $c_4}
                  {=og_text(og_get($v_m, ['name']))}
                {/capture}
                {=og_include('compose/Text.latte', ['size' => 'base', 'weight' => 'semibold', 'children' => (string) $c_4])|noescape}
                {capture $c_5}
                  {=og_text(og_get($v_m, ['role']))}
                {/capture}
                {=og_include('compose/Text.latte', ['size' => 'sm', 'class' => 'text-muted-foreground', 'children' => (string) $c_5])|noescape}
              {/capture}
              {=og_include('compose/Stack.latte', ['gap' => '0', 'children' => (string) $c_6])|noescape}
              {capture $c_7}
                {=og_text(og_get($v_m, ['bio']))}
              {/capture}
              {=og_include('compose/Text.latte', ['size' => 'sm', 'class' => 'text-muted-foreground', 'children' => (string) $c_7])|noescape}
            {/capture}
            {=og_include('compose/Stack.latte', ['gap' => '2', 'children' => (string) $c_8])|noescape}
          {/capture}
          {=og_include('compose/Stack.latte', ['gap' => '4', 'class' => 'rounded bg-card inset-ring inset-ring-border p-4', 'attrs' => og_attrs(['data-slot', 'item']), 'children' => (string) $c_9])|noescape}
        {else}
          {=og_include('blocks/member-row.latte', ['p' => ['member' => $v_m, 'depts' => $v_depts, 'layout' => $v_layout]])|noescape}
        {/if}
      {/foreach}
    {/capture}
    {=og_include('compose/Box.latte', ['class' => og_s((og_t(og_eq($v_layout, 'minimal')) ? 'grid grid-cols-2 gap-8 md:grid-cols-4' : (og_t(og_eq($v_layout, 'directory')) ? 'grid grid-cols-1 gap-4 md:grid-cols-2' : (og_t(og_eq($v_layout, 'list')) ? 'flex flex-col gap-4' : (og_t(og_eq($v_cols, '1-3')) ? 'grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3' : 'grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-4'))))), 'attrs' => og_attrs(['data-slot', 'items']), 'children' => (string) $c_10])|noescape}
  {/if}
{/capture}
{=og_include('blocks/section-frame.latte', ['p' => ['id' => $v_id, 'title' => $v_title, 'lead' => $v_lead, 'tone' => $v_tone, 'density' => $v_density, 'layout' => (og_t(og_eq($v_layout, 'list')) ? 'split' : 'stack'), 'media' => ['show' => og_eq($v_layout, 'list'), 'side' => 'start', 'align' => 'start'], 'landmarkLabel' => $v_landmarkLabel, 'aside' => og_markup($f_11)], 'children' => og_markup($c_12)])|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 team-grid
blocks/team-grid.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/team-grid.json
    The people of a team: portrait cards, a minimal grid of small portraits, detailed cards with skills, rows beside a picture, or a directory of two columns. Axes: layout (cards, minimal, detailed, list, directory), cols, tone, density.
    Props (p): id, title, lead, members, empty, depts, layout, cols, tone, density, image, imageAlt, landmarkLabel. -#}
{%- set v_id = og_def(p['id'], none) -%}
{%- set v_title = og_def(p['title'], none) -%}
{%- set v_lead = og_def(p['lead'], '') -%}
{%- set v_members = og_def(p['members'], none) -%}
{%- set v_empty = og_def(p['empty'], '') -%}
{%- set v_depts = og_def(p['depts'], none) -%}
{%- set v_layout = og_def(p['layout'], 'cards') -%}
{%- set v_cols = og_def(p['cols'], '1-4') -%}
{%- set v_tone = og_def(p['tone'], 'default') -%}
{%- set v_density = og_def(p['density'], 'default') -%}
{%- set v_image = og_def(p['image'], none) -%}
{%- set v_imageAlt = og_def(p['imageAlt'], none) -%}
{%- set v_landmarkLabel = og_def(p['landmarkLabel'], none) -%}
{%- set f_11 -%}
  {{ og_include('blocks/media-frame.html.j2', {'p': {'alt': (v_imageAlt if og_t(v_imageAlt) else v_title), 'src': v_image, 'ratio': '3/4'}}) }}
{%- endset -%}
{%- set c_12 -%}
  {%- if og_t(og_eq(og_len(v_members), 0)) %}
    {{ og_include('blocks/empty-state.html.j2', {'p': {'icon': 'users', 'title': v_empty}}) }}
  {%- else %}
    {%- set c_10 -%}
      {%- for v_m in og_l(v_members) %}
        {%- if og_t(og_eq(v_layout, 'minimal')) %}
          {%- set c_3 -%}
            {{ og_include('blocks/media-frame.html.j2', {'p': {'alt': og_get(v_m, ['name']), 'src': og_get(v_m, ['image']), 'ratio': '1/1', 'className': og_cnv([og_cnv(['size-16', 'shrink-0'])])}}) }}
            {%- set c_1 -%}
              {{ og_text(og_get(v_m, ['name'])) }}
            {%- endset -%}
            {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_1}) }}
            {%- set c_2 -%}
              {{ og_text(og_get(v_m, ['role'])) }}
            {%- 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': '2', 'Align': 'center', 'Class': 'text-center', 'Attrs': og_attrs(['data-slot', 'item'])}, 'children': c_3}) }}
        {%- elif og_t(og_eq(v_layout, 'cards')) %}
          {%- set c_9 -%}
            {{ og_include('blocks/media-frame.html.j2', {'p': {'alt': og_get(v_m, ['name']), 'src': og_get(v_m, ['image']), 'ratio': '1/1'}}) }}
            {%- set c_8 -%}
              {%- set c_6 -%}
                {%- set c_4 -%}
                  {{ og_text(og_get(v_m, ['name'])) }}
                {%- endset -%}
                {{ og_include('compose/text.html.j2', {'p': {'Size': 'base', 'Weight': 'semibold'}, 'children': c_4}) }}
                {%- set c_5 -%}
                  {{ og_text(og_get(v_m, ['role'])) }}
                {%- endset -%}
                {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_5}) }}
              {%- endset -%}
              {{ og_include('compose/stack.html.j2', {'p': {'Gap': '0'}, 'children': c_6}) }}
              {%- set c_7 -%}
                {{ og_text(og_get(v_m, ['bio'])) }}
              {%- endset -%}
              {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_7}) }}
            {%- endset -%}
            {{ og_include('compose/stack.html.j2', {'p': {'Gap': '2'}, 'children': c_8}) }}
          {%- endset -%}
          {{ og_include('compose/stack.html.j2', {'p': {'Gap': '4', 'Class': 'rounded bg-card inset-ring inset-ring-border p-4', 'Attrs': og_attrs(['data-slot', 'item'])}, 'children': c_9}) }}
        {%- else %}
          {{ og_include('blocks/member-row.html.j2', {'p': {'member': v_m, 'depts': v_depts, 'layout': v_layout}}) }}
        {%- endif %}
      {%- endfor %}
    {%- endset -%}
    {{ og_include('compose/box.html.j2', {'p': {'Class': og_s(('grid grid-cols-2 gap-8 md:grid-cols-4' if og_t(og_eq(v_layout, 'minimal')) else ('grid grid-cols-1 gap-4 md:grid-cols-2' if og_t(og_eq(v_layout, 'directory')) else ('flex flex-col gap-4' if og_t(og_eq(v_layout, 'list')) else ('grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3' if og_t(og_eq(v_cols, '1-3')) else 'grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-4'))))), 'Attrs': og_attrs(['data-slot', 'items'])}, 'children': c_10}) }}
  {%- endif %}
{%- endset -%}
{{ og_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'tone': v_tone, 'density': v_density, 'layout': ('split' if og_t(og_eq(v_layout, 'list')) else 'stack'), 'media': {'show': og_eq(v_layout, 'list'), 'side': 'start', 'align': 'start'}, 'landmarkLabel': v_landmarkLabel, 'aside': og_markup(f_11)}, 'children': og_markup(c_12)}) }}

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 people of a team: portrait cards, a minimal grid of small portraits, detailed cards with skills, rows beside a picture, or a directory of two columns. Axes: layout (cards, minimal, detailed, list, directory), cols, tone, density.

Props of TeamGrid
PropTypeDefault Description
id (required)string-
title (required)string-
lead string""
members (required)Member[]-
empty string""the text of the empty state (no records), from the dictionary
depts (required)Record<string, string>-the name of each department
layout "cards" | "minimal" | "detailed" | "list" | "directory""cards"
cols "1-3" | "1-4""1-4"
tone "default" | "muted""default"
density "default" | "compact""default"
image string-address of the picture (an https URL or a path); none: the placeholder
imageAlt string-alt text of the picture; none: the title
landmarkLabel string-accessible name of the landmark of this component when the page shows it more than once (a variant); replaces the heading name of the root landmark, follows the name of a nested one

Used in