Skip to content
ui8kit

component / components

Footer Card

Footer Card component

Install

npx ui8kit add footer-card

Pulls in: block, box, compose, container, group, inline, kit-box, kit-text, list, list-item, lucide-icon, mega-menu, menu-entry, nav-block, presets, stack, text, utils

Preview

Northwind

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 footer-card
components/footer-card.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 card layout of SitemapFooter: the brand mark and word, then the link groups in one row, in a rounded card. -->
<script lang="ts" module>
  import type { Snippet } from "svelte";
  import type { MegaGroup } from "../blocks/mega-menu.types";

  export type FooterCardProps = {
    label: string;
    brand: string;
    groups: MegaGroup[];
    landmarkLabel?: string;
  };
</script>

<script lang="ts">
  import Block from "../compose/Block.svelte";
  import Box from "../compose/Box.svelte";
  import Container from "../compose/Container.svelte";
  import Group from "../compose/Group.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 MenuEntry from "../components/menu-entry.svelte";
  import NavBlock from "../components/nav-block.svelte";
  import { defaults } from "../presets/defaults";
  import { cn, tpl, uniqLabel } from "../utils";

  let { label, brand, groups, landmarkLabel }: FooterCardProps = $props();
</script>

<Block tag="footer" class="py-8" data-layout="card" aria-label={landmarkLabel} data-slot="site-footer">
  <Container class={cn(cn("mx-auto w-full px-4", defaults.section.landing), "px-0")} data-slot="container">
    <Box
      class={cn("flex w-full flex-row items-start overflow-hidden bg-muted p-10", defaults.footer.card)}
      data-slot="footer-card"
    >
      <Group gap="4" align="center" class={cn("h-8 shrink-0", defaults.footer.brand)} data-slot="footer-brand">
        <Inline class="flex size-8 items-center justify-center rounded bg-foreground text-background">
          <LucideIcon name="hexagon" size={16} />
        </Inline>
        <Text size="base" weight="bold">
          {brand}
        </Text>
      </Group>
      {#if ((groups?.length ?? 0) > 0)}
        <NavBlock
          label={(landmarkLabel ? uniqLabel(tpl("{0}, {1}", label, landmarkLabel)) : label)}
          class="min-w-0 flex-1"
        >
          <Group
            gap="0"
            align="start"
            class={cn("flex w-full flex-nowrap justify-between", defaults.footer.groups)}
            data-slot="footer-groups"
          >
            {#each groups as g (g.id)}
              <Stack gap="4" data-slot="group">
                <Text size="xs" weight="semibold" class="leading-5">
                  {g.title}
                </Text>
                <List class="m-0 flex list-none flex-col gap-4 p-0">
                  {#each g.links as item (item.id)}
                    <ListItem data-slot="links-row">
                      <MenuEntry href={item.href} class="text-xs leading-5 text-muted-foreground">
                        {item.name}
                      </MenuEntry>
                    </ListItem>
                  {/each}
                </List>
              </Stack>
            {/each}
          </Group>
        </NavBlock>
      {/if}
    </Box>
  </Container>
</Block>

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 footer-card
components/footer-card.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 card layout of SitemapFooter: the brand mark and word, then the link groups in one row, in a rounded card. */
import { type ReactNode } from "react";
import { Block, Box, Container, Group, Inline, List, ListItem, Stack, Text } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import { MenuEntry } from "../components/menu-entry";
import { NavBlock } from "../components/nav-block";
import { defaults } from "../presets/defaults";
import { cn, tpl, uniqLabel } from "../utils";
import type { MegaGroup } from "../blocks/mega-menu.types";

export type FooterCardProps = {
  label: string;
  brand: string;
  groups: MegaGroup[];
  landmarkLabel?: string;
};

export function FooterCard({ label, brand, groups, landmarkLabel }: FooterCardProps) {
  return (
    <Block tag="footer" className="py-8" data-layout="card" aria-label={landmarkLabel} data-slot="site-footer">
      <Container className={cn(cn("mx-auto w-full px-4", defaults.section.landing), "px-0")} data-slot="container">
        <Box
          className={cn(
            "flex w-full flex-row items-start overflow-hidden bg-muted p-10",
            defaults.footer.card
          )}
          data-slot="footer-card"
        >
          <Group gap="4" align="center" className={cn("h-8 shrink-0", defaults.footer.brand)} data-slot="footer-brand">
            <Inline className="flex size-8 items-center justify-center rounded bg-foreground text-background">
              <LucideIcon name="hexagon" size={16} />
            </Inline>
            <Text size="base" weight="bold">
              {brand}
            </Text>
          </Group>
          {((groups?.length ?? 0) > 0) ? (
            <NavBlock
              label={(landmarkLabel ? uniqLabel(tpl("{0}, {1}", label, landmarkLabel)) : label)}
              className="min-w-0 flex-1"
            >
              <Group
                gap="0"
                align="start"
                className={cn("flex w-full flex-nowrap justify-between", defaults.footer.groups)}
                data-slot="footer-groups"
              >
                {(groups ?? []).map((g) => (
                  <Stack key={g.id} gap="4" data-slot="group">
                    <Text size="xs" weight="semibold" className="leading-5">
                      {g.title}
                    </Text>
                    <List className="m-0 flex list-none flex-col gap-4 p-0">
                      {(g.links ?? []).map((item) => (
                        <ListItem key={item.id} data-slot="links-row">
                          <MenuEntry href={item.href} className="text-xs leading-5 text-muted-foreground">
                            {item.name}
                          </MenuEntry>
                        </ListItem>
                      ))}
                    </List>
                  </Stack>
                ))}
              </Group>
            </NavBlock>
          ) : null}
        </Box>
      </Container>
    </Block>
  );
}

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 footer-card
components/footer-card.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 card layout of SitemapFooter: the brand mark and word, then the link groups in one row, in a rounded card. -->
<script lang="ts">
import type { MegaGroup } from "../blocks/mega-menu.types";

export type FooterCardProps = {
  label: string;
  brand: string;
  groups: MegaGroup[];
  landmarkLabel?: string;
};
</script>

<script setup lang="ts">
import Block from "../compose/Block.vue";
import Box from "../compose/Box.vue";
import Container from "../compose/Container.vue";
import Group from "../compose/Group.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 MenuEntry from "../components/menu-entry.vue";
import NavBlock from "../components/nav-block.vue";
import { defaults } from "../presets/defaults";
import { cn, tpl, uniqLabel } from "../utils";

const { label, brand, groups, landmarkLabel } = defineProps<FooterCardProps>();
</script>

<template>
  <Block tag="footer" class="py-8" data-layout="card" :aria-label="landmarkLabel" data-slot="site-footer">
    <Container :class="cn(cn('mx-auto w-full px-4', defaults.section.landing), 'px-0')" data-slot="container">
      <Box
        :class="cn('flex w-full flex-row items-start overflow-hidden bg-muted p-10', defaults.footer.card)"
        data-slot="footer-card"
      >
        <Group gap="4" align="center" :class="cn('h-8 shrink-0', defaults.footer.brand)" data-slot="footer-brand">
          <Inline class="flex size-8 items-center justify-center rounded bg-foreground text-background">
            <LucideIcon name="hexagon" :size="16" />
          </Inline>
          <Text size="base" weight="bold">
            {{ brand }}
          </Text>
        </Group>
        <NavBlock v-if="((groups?.length ?? 0) > 0)"
          :label="(landmarkLabel ? uniqLabel(tpl('{0}, {1}', label, landmarkLabel)) : label)"
          class="min-w-0 flex-1"
        >
          <Group
            gap="0"
            align="start"
            :class="cn('flex w-full flex-nowrap justify-between', defaults.footer.groups)"
            data-slot="footer-groups"
          >
            <Stack v-for="g in groups" :key="g.id" gap="4" data-slot="group">
              <Text size="xs" weight="semibold" class="leading-5">
                {{ g.title }}
              </Text>
              <List class="m-0 flex list-none flex-col gap-4 p-0">
                <ListItem v-for="item in g.links" :key="item.id" data-slot="links-row">
                  <MenuEntry :href="item.href" class="text-xs leading-5 text-muted-foreground">
                    {{ item.name }}
                  </MenuEntry>
                </ListItem>
              </List>
            </Stack>
          </Group>
        </NavBlock>
      </Box>
    </Container>
  </Block>
</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 footer-card
components/footer-card.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 card layout of SitemapFooter: the brand mark and word, then the link groups in one row, in a rounded card. */
import { For, type JSX } from "solid-js";
import { Block, Box, Container, Group, Inline, List, ListItem, Stack, Text } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import { MenuEntry } from "../components/menu-entry";
import { NavBlock } from "../components/nav-block";
import { defaults } from "../presets/defaults";
import { cn, tpl, uniqLabel } from "../utils";
import type { MegaGroup } from "../blocks/mega-menu.types";

export type FooterCardProps = {
  label: string;
  brand: string;
  groups: MegaGroup[];
  landmarkLabel?: string;
};

export function FooterCard({ label, brand, groups, landmarkLabel }: FooterCardProps) {
  return (
    <Block tag="footer" class="py-8" data-layout="card" aria-label={landmarkLabel} data-slot="site-footer">
      <Container class={cn(cn("mx-auto w-full px-4", defaults.section.landing), "px-0")} data-slot="container">
        <Box
          class={cn("flex w-full flex-row items-start overflow-hidden bg-muted p-10", defaults.footer.card)}
          data-slot="footer-card"
        >
          <Group gap="4" align="center" class={cn("h-8 shrink-0", defaults.footer.brand)} data-slot="footer-brand">
            <Inline class="flex size-8 items-center justify-center rounded bg-foreground text-background">
              <LucideIcon name="hexagon" size={16} />
            </Inline>
            <Text size="base" weight="bold">
              {brand}
            </Text>
          </Group>
          {((groups?.length ?? 0) > 0) ? (
            <NavBlock
              label={(landmarkLabel ? uniqLabel(tpl("{0}, {1}", label, landmarkLabel)) : label)}
              class="min-w-0 flex-1"
            >
              <Group
                gap="0"
                align="start"
                class={cn("flex w-full flex-nowrap justify-between", defaults.footer.groups)}
                data-slot="footer-groups"
              >
                <For each={groups ?? []}>{(g) => (
                  <Stack gap="4" data-slot="group">
                    <Text size="xs" weight="semibold" class="leading-5">
                      {g.title}
                    </Text>
                    <List class="m-0 flex list-none flex-col gap-4 p-0">
                      <For each={g.links ?? []}>{(item) => (
                        <ListItem data-slot="links-row">
                          <MenuEntry href={item.href} class="text-xs leading-5 text-muted-foreground">
                            {item.name}
                          </MenuEntry>
                        </ListItem>
                      )}</For>
                    </List>
                  </Stack>
                )}</For>
              </Group>
            </NavBlock>
          ) : null}
        </Box>
      </Container>
    </Block>
  );
}

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 footer-card
blocks/footer-card.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/footer-card.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"
)

// FooterCardProps are the props of FooterCard; the values are the JSON shapes of the TypeScript props.
type FooterCardProps struct {
	Label any `json:"label"`
	Brand any `json:"brand"`
	Groups any `json:"groups"`
	LandmarkLabel any `json:"landmarkLabel"`
}

// The card layout of SitemapFooter: the brand mark and word, then the link groups in one row, in a rounded card.
templ FooterCard(p FooterCardProps) {
	{{ vLabel := p.Label }}
	{{ vBrand := p.Brand }}
	{{ vGroups := p.Groups }}
	{{ vLandmarkLabel := p.LandmarkLabel }}
	@compose.Block(compose.BlockProps{BoxProps: box.BoxProps{Tag: "footer", Class: "py-8", Attrs: uiutils.Attrs("data-layout", "card", "aria-label", vLandmarkLabel, "data-slot", "site-footer")}}) {
		@compose.Container(compose.ContainerProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(uiutils.Cnv("mx-auto w-full px-4", uiutils.Get(presetDefaults, "section", "landing")), "px-0")), Attrs: uiutils.Attrs("data-slot", "container")}}) {
			@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv("flex w-full flex-row items-start overflow-hidden bg-muted p-10", uiutils.Get(presetDefaults, "footer", "card"))), Attrs: uiutils.Attrs("data-slot", "footer-card")}}) {
				@compose.Group(compose.GroupProps{Gap: "4", Align: "center", BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv("h-8 shrink-0", uiutils.Get(presetDefaults, "footer", "brand"))), Attrs: uiutils.Attrs("data-slot", "footer-brand")}}) {
					@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: "flex size-8 items-center justify-center rounded bg-foreground text-background"}}) {
						@icons.LucideIcon(icons.LucideIconProps{Name: "hexagon", Size: 16})
					}
					@compose.Text(compose.TextProps{Size: "base", Weight: "bold", TextProps: text.TextProps{}}) {
						{ uiutils.Text(vBrand) }
					}
				}
				if uiutils.Gt(uiutils.Len(vGroups), float64(0)) {
					@NavBlock(NavBlockProps{Label: uiutils.Cond(uiutils.T(vLandmarkLabel), uiutils.Uniq(uiutils.Tpl("{0}, {1}", vLabel, vLandmarkLabel)), vLabel), Class: uiutils.Cnv("min-w-0 flex-1")}) {
						@compose.Group(compose.GroupProps{Gap: "0", Align: "start", BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv("flex w-full flex-nowrap justify-between", uiutils.Get(presetDefaults, "footer", "groups"))), Attrs: uiutils.Attrs("data-slot", "footer-groups")}}) {
							for _, vG := range uiutils.L(vGroups) {
								@compose.Stack(compose.StackProps{Gap: "4", BoxProps: box.BoxProps{Attrs: uiutils.Attrs("data-slot", "group")}}) {
									@compose.Text(compose.TextProps{Size: "xs", Weight: "semibold", TextProps: text.TextProps{Class: "leading-5"}}) {
										{ uiutils.Text(uiutils.Get(vG, "title")) }
									}
									@compose.List(compose.ListProps{BoxProps: box.BoxProps{Class: "m-0 flex list-none flex-col gap-4 p-0"}}) {
										for _, vItem := range uiutils.L(uiutils.Get(vG, "links")) {
											@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Attrs: uiutils.Attrs("data-slot", "links-row")}}) {
												@MenuEntry(MenuEntryProps{Href: uiutils.Get(vItem, "href"), Class: uiutils.Cnv("text-xs leading-5 text-muted-foreground")}) {
													{ uiutils.Text(uiutils.Get(vItem, "name")) }
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
}

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 footer-card
blocks/footer-card.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/footer-card.json
    The card layout of SitemapFooter: the brand mark and word, then the link groups in one row, in a rounded card.
    Props (p): label, brand, groups, landmarkLabel. -#}
{%- set v_label = (p.label ?? null) -%}
{%- set v_brand = (p.brand ?? null) -%}
{%- set v_groups = (p.groups ?? null) -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- set c_13 -%}
  {%- set c_12 -%}
    {%- set c_11 -%}
      {%- set c_3 -%}
        {%- set c_1 -%}
          {{ include('icons/LucideIcon.html.twig', {'name': 'hexagon', 'size': 16}, with_context = false) }}
        {%- endset -%}
        {{ include('compose/Inline.html.twig', {'class': 'flex size-8 items-center justify-center rounded bg-foreground text-background', 'children': c_1}, with_context = false) }}
        {%- set c_2 -%}
          {{ og_text(v_brand) }}
        {%- endset -%}
        {{ include('compose/Text.html.twig', {'size': 'base', 'weight': 'bold', 'children': c_2}, with_context = false) }}
      {%- endset -%}
      {{ include('compose/Group.html.twig', {'gap': '4', 'align': 'center', 'class': og_s(og_cnv(['h-8 shrink-0', og_preset('blocks/presets/defaults.json', ['footer', 'brand'])])), 'attrs': og_attrs(['data-slot', 'footer-brand']), 'children': c_3}, with_context = false) }}
      {%- if og_t(og_gt(og_len(v_groups), 0)) %}
        {%- set c_10 -%}
          {%- set c_9 -%}
            {%- for v_g in og_l(v_groups) %}
              {%- set c_8 -%}
                {%- set c_4 -%}
                  {{ og_text(og_get(v_g, ['title'])) }}
                {%- endset -%}
                {{ include('compose/Text.html.twig', {'size': 'xs', 'weight': 'semibold', 'class': 'leading-5', 'children': c_4}, with_context = false) }}
                {%- set c_7 -%}
                  {%- for v_item in og_l(og_get(v_g, ['links'])) %}
                    {%- set c_6 -%}
                      {%- set c_5 -%}
                        {{ og_text(og_get(v_item, ['name'])) }}
                      {%- endset -%}
                      {{ include('blocks/menu-entry.html.twig', {'p': {'href': og_get(v_item, ['href']), 'className': og_cnv(['text-xs leading-5 text-muted-foreground'])}, 'children': og_markup(c_5)}, with_context = false) }}
                    {%- endset -%}
                    {{ include('compose/ListItem.html.twig', {'attrs': og_attrs(['data-slot', 'links-row']), 'children': c_6}, with_context = false) }}
                  {%- endfor %}
                {%- endset -%}
                {{ include('compose/List.html.twig', {'class': 'm-0 flex list-none flex-col gap-4 p-0', 'children': c_7}, with_context = false) }}
              {%- endset -%}
              {{ include('compose/Stack.html.twig', {'gap': '4', 'attrs': og_attrs(['data-slot', 'group']), 'children': c_8}, with_context = false) }}
            {%- endfor %}
          {%- endset -%}
          {{ include('compose/Group.html.twig', {'gap': '0', 'align': 'start', 'class': og_s(og_cnv(['flex w-full flex-nowrap justify-between', og_preset('blocks/presets/defaults.json', ['footer', 'groups'])])), 'attrs': og_attrs(['data-slot', 'footer-groups']), 'children': c_9}, with_context = false) }}
        {%- endset -%}
        {{ include('blocks/nav-block.html.twig', {'p': {'label': (og_t(v_landmarkLabel) ? og_uniq(og_tpl('{0}, {1}', [v_label, v_landmarkLabel])) : v_label), 'className': og_cnv(['min-w-0 flex-1'])}, 'children': og_markup(c_10)}, with_context = false) }}
      {%- endif %}
    {%- endset -%}
    {{ include('compose/Box.html.twig', {'class': og_s(og_cnv(['flex w-full flex-row items-start overflow-hidden bg-muted p-10', og_preset('blocks/presets/defaults.json', ['footer', 'card'])])), 'attrs': og_attrs(['data-slot', 'footer-card']), 'children': c_11}, with_context = false) }}
  {%- endset -%}
  {{ include('compose/Container.html.twig', {'class': og_s(og_cnv([og_cnv(['mx-auto w-full px-4', og_preset('blocks/presets/defaults.json', ['section', 'landing'])]), 'px-0'])), 'attrs': og_attrs(['data-slot', 'container']), 'children': c_12}, with_context = false) }}
{%- endset -%}
{{ include('compose/Block.html.twig', {'tag': 'footer', 'class': 'py-8', 'attrs': og_attrs(['data-layout', 'card', 'aria-label', v_landmarkLabel, 'data-slot', 'site-footer']), 'children': c_13}, 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 footer-card
blocks/footer-card.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/footer-card.json
    The card layout of SitemapFooter: the brand mark and word, then the link groups in one row, in a rounded card.
    Props (p): label, brand, groups, landmarkLabel. *}
{var $v_label = ($p['label'] ?? null)}
{var $v_brand = ($p['brand'] ?? null)}
{var $v_groups = ($p['groups'] ?? null)}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{capture $c_13}
  {capture $c_12}
    {capture $c_11}
      {capture $c_3}
        {capture $c_1}
          {=og_include('icons/LucideIcon.latte', ['name' => 'hexagon', 'size' => 16])|noescape}
        {/capture}
        {=og_include('compose/Inline.latte', ['class' => 'flex size-8 items-center justify-center rounded bg-foreground text-background', 'children' => (string) $c_1])|noescape}
        {capture $c_2}
          {=og_text($v_brand)}
        {/capture}
        {=og_include('compose/Text.latte', ['size' => 'base', 'weight' => 'bold', 'children' => (string) $c_2])|noescape}
      {/capture}
      {=og_include('compose/Group.latte', ['gap' => '4', 'align' => 'center', 'class' => og_s(og_cnv(['h-8 shrink-0', og_preset('blocks/presets/defaults.json', ['footer', 'brand'])])), 'attrs' => og_attrs(['data-slot', 'footer-brand']), 'children' => (string) $c_3])|noescape}
      {if og_t(og_gt(og_len($v_groups), 0))}
        {capture $c_10}
          {capture $c_9}
            {foreach og_l($v_groups) as $v_g}
              {capture $c_8}
                {capture $c_4}
                  {=og_text(og_get($v_g, ['title']))}
                {/capture}
                {=og_include('compose/Text.latte', ['size' => 'xs', 'weight' => 'semibold', 'class' => 'leading-5', 'children' => (string) $c_4])|noescape}
                {capture $c_7}
                  {foreach og_l(og_get($v_g, ['links'])) as $v_item}
                    {capture $c_6}
                      {capture $c_5}
                        {=og_text(og_get($v_item, ['name']))}
                      {/capture}
                      {=og_include('blocks/menu-entry.latte', ['p' => ['href' => og_get($v_item, ['href']), 'className' => og_cnv(['text-xs leading-5 text-muted-foreground'])], 'children' => og_markup($c_5)])|noescape}
                    {/capture}
                    {=og_include('compose/ListItem.latte', ['attrs' => og_attrs(['data-slot', 'links-row']), 'children' => (string) $c_6])|noescape}
                  {/foreach}
                {/capture}
                {=og_include('compose/List.latte', ['class' => 'm-0 flex list-none flex-col gap-4 p-0', 'children' => (string) $c_7])|noescape}
              {/capture}
              {=og_include('compose/Stack.latte', ['gap' => '4', 'attrs' => og_attrs(['data-slot', 'group']), 'children' => (string) $c_8])|noescape}
            {/foreach}
          {/capture}
          {=og_include('compose/Group.latte', ['gap' => '0', 'align' => 'start', 'class' => og_s(og_cnv(['flex w-full flex-nowrap justify-between', og_preset('blocks/presets/defaults.json', ['footer', 'groups'])])), 'attrs' => og_attrs(['data-slot', 'footer-groups']), 'children' => (string) $c_9])|noescape}
        {/capture}
        {=og_include('blocks/nav-block.latte', ['p' => ['label' => (og_t($v_landmarkLabel) ? og_uniq(og_tpl('{0}, {1}', [$v_label, $v_landmarkLabel])) : $v_label), 'className' => og_cnv(['min-w-0 flex-1'])], 'children' => og_markup($c_10)])|noescape}
      {/if}
    {/capture}
    {=og_include('compose/Box.latte', ['class' => og_s(og_cnv(['flex w-full flex-row items-start overflow-hidden bg-muted p-10', og_preset('blocks/presets/defaults.json', ['footer', 'card'])])), 'attrs' => og_attrs(['data-slot', 'footer-card']), 'children' => (string) $c_11])|noescape}
  {/capture}
  {=og_include('compose/Container.latte', ['class' => og_s(og_cnv([og_cnv(['mx-auto w-full px-4', og_preset('blocks/presets/defaults.json', ['section', 'landing'])]), 'px-0'])), 'attrs' => og_attrs(['data-slot', 'container']), 'children' => (string) $c_12])|noescape}
{/capture}
{=og_include('compose/Block.latte', ['tag' => 'footer', 'class' => 'py-8', 'attrs' => og_attrs(['data-layout', 'card', 'aria-label', $v_landmarkLabel, 'data-slot', 'site-footer']), 'children' => (string) $c_13])|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 footer-card
blocks/footer-card.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/footer-card.json
    The card layout of SitemapFooter: the brand mark and word, then the link groups in one row, in a rounded card.
    Props (p): label, brand, groups, landmarkLabel. -#}
{%- set v_label = og_def(p['label'], none) -%}
{%- set v_brand = og_def(p['brand'], none) -%}
{%- set v_groups = og_def(p['groups'], none) -%}
{%- set v_landmarkLabel = og_def(p['landmarkLabel'], none) -%}
{%- set c_13 -%}
  {%- set c_12 -%}
    {%- set c_11 -%}
      {%- set c_3 -%}
        {%- set c_1 -%}
          {{ og_include('icons/lucide-icon.html.j2', {'p': {'Name': 'hexagon', 'Size': 16}}) }}
        {%- endset -%}
        {{ og_include('compose/inline.html.j2', {'p': {'Class': 'flex size-8 items-center justify-center rounded bg-foreground text-background'}, 'children': c_1}) }}
        {%- set c_2 -%}
          {{ og_text(v_brand) }}
        {%- endset -%}
        {{ og_include('compose/text.html.j2', {'p': {'Size': 'base', 'Weight': 'bold'}, 'children': c_2}) }}
      {%- endset -%}
      {{ og_include('compose/group.html.j2', {'p': {'Gap': '4', 'Align': 'center', 'Class': og_s(og_cnv(['h-8 shrink-0', og_preset('blocks/presets/defaults.json', ['footer', 'brand'])])), 'Attrs': og_attrs(['data-slot', 'footer-brand'])}, 'children': c_3}) }}
      {%- if og_t(og_gt(og_len(v_groups), 0)) %}
        {%- set c_10 -%}
          {%- set c_9 -%}
            {%- for v_g in og_l(v_groups) %}
              {%- set c_8 -%}
                {%- set c_4 -%}
                  {{ og_text(og_get(v_g, ['title'])) }}
                {%- endset -%}
                {{ og_include('compose/text.html.j2', {'p': {'Size': 'xs', 'Weight': 'semibold', 'Class': 'leading-5'}, 'children': c_4}) }}
                {%- set c_7 -%}
                  {%- for v_item in og_l(og_get(v_g, ['links'])) %}
                    {%- set c_6 -%}
                      {%- set c_5 -%}
                        {{ og_text(og_get(v_item, ['name'])) }}
                      {%- endset -%}
                      {{ og_include('blocks/menu-entry.html.j2', {'p': {'href': og_get(v_item, ['href']), 'className': og_cnv(['text-xs leading-5 text-muted-foreground'])}, 'children': og_markup(c_5)}) }}
                    {%- endset -%}
                    {{ og_include('compose/list-item.html.j2', {'p': {'Attrs': og_attrs(['data-slot', 'links-row'])}, 'children': c_6}) }}
                  {%- endfor %}
                {%- endset -%}
                {{ og_include('compose/list.html.j2', {'p': {'Class': 'm-0 flex list-none flex-col gap-4 p-0'}, 'children': c_7}) }}
              {%- endset -%}
              {{ og_include('compose/stack.html.j2', {'p': {'Gap': '4', 'Attrs': og_attrs(['data-slot', 'group'])}, 'children': c_8}) }}
            {%- endfor %}
          {%- endset -%}
          {{ og_include('compose/group.html.j2', {'p': {'Gap': '0', 'Align': 'start', 'Class': og_s(og_cnv(['flex w-full flex-nowrap justify-between', og_preset('blocks/presets/defaults.json', ['footer', 'groups'])])), 'Attrs': og_attrs(['data-slot', 'footer-groups'])}, 'children': c_9}) }}
        {%- endset -%}
        {{ og_include('blocks/nav-block.html.j2', {'p': {'label': (og_uniq(og_tpl('{0}, {1}', [v_label, v_landmarkLabel])) if og_t(v_landmarkLabel) else v_label), 'className': og_cnv(['min-w-0 flex-1'])}, 'children': og_markup(c_10)}) }}
      {%- endif %}
    {%- endset -%}
    {{ og_include('compose/box.html.j2', {'p': {'Class': og_s(og_cnv(['flex w-full flex-row items-start overflow-hidden bg-muted p-10', og_preset('blocks/presets/defaults.json', ['footer', 'card'])])), 'Attrs': og_attrs(['data-slot', 'footer-card'])}, 'children': c_11}) }}
  {%- endset -%}
  {{ og_include('compose/container.html.j2', {'p': {'Class': og_s(og_cnv([og_cnv(['mx-auto w-full px-4', og_preset('blocks/presets/defaults.json', ['section', 'landing'])]), 'px-0'])), 'Attrs': og_attrs(['data-slot', 'container'])}, 'children': c_12}) }}
{%- endset -%}
{{ og_include('compose/block.html.j2', {'p': {'Tag': 'footer', 'Class': 'py-8', 'Attrs': og_attrs(['data-layout', 'card', 'aria-label', v_landmarkLabel, 'data-slot', 'site-footer'])}, 'children': c_13}) }}

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 card layout of SitemapFooter: the brand mark and word, then the link groups in one row, in a rounded card.

Props of FooterCard
PropTypeDefault Description
label (required)string-accessible name of the link groups
brand (required)string-
groups (required)MegaGroup[]-
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