Footer Contacts
Footer Contacts component
Install
npx ui8kit add footer-contactsPulls in: compose, footer-split, group, inline, kit-box, kit-text, lucide-icon, stack, text, utils
Preview
hello@northwind.example
Phone
+1 555 0100
Office
12 Harbor Street, Portland
Website
northwind.example
Code
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework svelte --dir src --registry-url https://registry.buildy.tw/svelte --strict-cdnnpx ui8kit add footer-contacts<!-- 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 ways to reach the team in a column: a glyph tile, the kind (Email, Phone) and the value. -->
<script lang="ts" module>
import type { Snippet } from "svelte";
import type { FooterExtras, FooterSplitLabels } from "../blocks/footer-split.types";
export type FooterContactsProps = {
extras: FooterExtras;
};
</script>
<script lang="ts">
import Group from "../compose/Group.svelte";
import Inline from "../compose/Inline.svelte";
import LucideIcon from "../icons/LucideIcon.svelte";
import Stack from "../compose/Stack.svelte";
import Text from "../compose/Text.svelte";
let { extras }: FooterContactsProps = $props();
</script>
{#if ((extras.contacts?.length ?? 0) > 0)}
<Stack gap="4" align="stretch" data-slot="footer-contacts">
{#each extras.contacts as c (c.id)}
<Group gap="4" align="center" data-slot="footer-contact">
<Inline class="flex size-10 shrink-0 items-center justify-center rounded bg-muted text-foreground">
<LucideIcon name={c.icon} size={20} />
</Inline>
<Stack gap="0">
<Text size="sm" weight="semibold">
{c.title}
</Text>
<Text size="sm" class="text-muted-foreground">
{c.text}
</Text>
</Stack>
</Group>
{/each}
</Stack>
{/if}
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework react --dir src --registry-url https://registry.buildy.tw/react --strict-cdnnpx ui8kit add footer-contacts// 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 ways to reach the team in a column: a glyph tile, the kind (Email, Phone) and the value. */
import { type ReactNode } from "react";
import { Group, Inline, Stack, Text } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import type { FooterExtras, FooterSplitLabels } from "../blocks/footer-split.types";
export type FooterContactsProps = {
extras: FooterExtras;
};
export function FooterContacts({ extras }: FooterContactsProps) {
return (
<>
{((extras.contacts?.length ?? 0) > 0) ? (
<Stack gap="4" align="stretch" data-slot="footer-contacts">
{(extras.contacts ?? []).map((c) => (
<Group key={c.id} gap="4" align="center" data-slot="footer-contact">
<Inline className="flex size-10 shrink-0 items-center justify-center rounded bg-muted text-foreground">
<LucideIcon name={c.icon} size={20} />
</Inline>
<Stack gap="0">
<Text size="sm" weight="semibold">
{c.title}
</Text>
<Text size="sm" className="text-muted-foreground">
{c.text}
</Text>
</Stack>
</Group>
))}
</Stack>
) : null}
</>
);
}
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework vue --dir src --registry-url https://registry.buildy.tw/vue --strict-cdnnpx ui8kit add footer-contacts<!-- 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 ways to reach the team in a column: a glyph tile, the kind (Email, Phone) and the value. -->
<script lang="ts">
import type { FooterExtras, FooterSplitLabels } from "../blocks/footer-split.types";
export type FooterContactsProps = {
extras: FooterExtras;
};
</script>
<script setup lang="ts">
import Group from "../compose/Group.vue";
import Inline from "../compose/Inline.vue";
import LucideIcon from "../icons/LucideIcon.vue";
import Stack from "../compose/Stack.vue";
import Text from "../compose/Text.vue";
const { extras } = defineProps<FooterContactsProps>();
</script>
<template>
<Stack v-if="((extras.contacts?.length ?? 0) > 0)" gap="4" align="stretch" data-slot="footer-contacts">
<Group v-for="c in extras.contacts" :key="c.id" gap="4" align="center" data-slot="footer-contact">
<Inline class="flex size-10 shrink-0 items-center justify-center rounded bg-muted text-foreground">
<LucideIcon :name="c.icon" :size="20" />
</Inline>
<Stack gap="0">
<Text size="sm" weight="semibold">
{{ c.title }}
</Text>
<Text size="sm" class="text-muted-foreground">
{{ c.text }}
</Text>
</Stack>
</Group>
</Stack>
</template>
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework solid --dir src --registry-url https://registry.buildy.tw/solid --strict-cdnnpx ui8kit add footer-contacts// 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 ways to reach the team in a column: a glyph tile, the kind (Email, Phone) and the value. */
import { For, type JSX } from "solid-js";
import { Group, Inline, Stack, Text } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import type { FooterExtras, FooterSplitLabels } from "../blocks/footer-split.types";
export type FooterContactsProps = {
extras: FooterExtras;
};
export function FooterContacts({ extras }: FooterContactsProps) {
return (
<>
{((extras.contacts?.length ?? 0) > 0) ? (
<Stack gap="4" align="stretch" data-slot="footer-contacts">
<For each={extras.contacts ?? []}>{(c) => (
<Group gap="4" align="center" data-slot="footer-contact">
<Inline class="flex size-10 shrink-0 items-center justify-center rounded bg-muted text-foreground">
<LucideIcon name={c.icon} size={20} />
</Inline>
<Stack gap="0">
<Text size="sm" weight="semibold">
{c.title}
</Text>
<Text size="sm" class="text-muted-foreground">
{c.text}
</Text>
</Stack>
</Group>
)}</For>
</Stack>
) : null}
</>
);
}
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework templ --dir src --registry-url https://registry.buildy.tw/templ --strict-cdnnpx ui8kit add footer-contacts// 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-contacts.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"
)
// FooterContactsProps are the props of FooterContacts; the values are the JSON shapes of the TypeScript props.
type FooterContactsProps struct {
Extras any `json:"extras"`
}
// The ways to reach the team in a column: a glyph tile, the kind (Email, Phone) and the value.
templ FooterContacts(p FooterContactsProps) {
{{ vExtras := p.Extras }}
if uiutils.Gt(uiutils.Len(uiutils.Get(vExtras, "contacts")), float64(0)) {
@compose.Stack(compose.StackProps{Gap: "4", Align: "stretch", BoxProps: box.BoxProps{Attrs: uiutils.Attrs("data-slot", "footer-contacts")}}) {
for _, vC := range uiutils.L(uiutils.Get(vExtras, "contacts")) {
@compose.Group(compose.GroupProps{Gap: "4", Align: "center", BoxProps: box.BoxProps{Attrs: uiutils.Attrs("data-slot", "footer-contact")}}) {
@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: "flex size-10 shrink-0 items-center justify-center rounded bg-muted text-foreground"}}) {
@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(uiutils.Get(vC, "icon")), Size: 20})
}
@compose.Stack(compose.StackProps{Gap: "0", BoxProps: box.BoxProps{}}) {
@compose.Text(compose.TextProps{Size: "sm", Weight: "semibold", TextProps: text.TextProps{}}) {
{ uiutils.Text(uiutils.Get(vC, "title")) }
}
@compose.Text(compose.TextProps{Size: "sm", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
{ uiutils.Text(uiutils.Get(vC, "text")) }
}
}
}
}
}
}
}
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework twig --dir src --registry-url https://registry.buildy.tw/twig --strict-cdnnpx ui8kit add footer-contacts{#- 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-contacts.json
The ways to reach the team in a column: a glyph tile, the kind (Email, Phone) and the value.
Props (p): extras. -#}
{%- set v_extras = (p.extras ?? null) -%}
{%- if og_t(og_gt(og_len(og_get(v_extras, ['contacts'])), 0)) %}
{%- set c_6 -%}
{%- for v_c in og_l(og_get(v_extras, ['contacts'])) %}
{%- set c_5 -%}
{%- set c_1 -%}
{{ include('icons/LucideIcon.html.twig', {'name': og_s(og_get(v_c, ['icon'])), 'size': 20}, with_context = false) }}
{%- endset -%}
{{ include('compose/Inline.html.twig', {'class': 'flex size-10 shrink-0 items-center justify-center rounded bg-muted text-foreground', 'children': c_1}, with_context = false) }}
{%- set c_4 -%}
{%- set c_2 -%}
{{ og_text(og_get(v_c, ['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_c, ['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': '0', 'children': c_4}, with_context = false) }}
{%- endset -%}
{{ include('compose/Group.html.twig', {'gap': '4', 'align': 'center', 'attrs': og_attrs(['data-slot', 'footer-contact']), 'children': c_5}, with_context = false) }}
{%- endfor %}
{%- endset -%}
{{ include('compose/Stack.html.twig', {'gap': '4', 'align': 'stretch', 'attrs': og_attrs(['data-slot', 'footer-contacts']), 'children': c_6}, with_context = false) }}
{%- endif %}
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework latte --dir src --registry-url https://registry.buildy.tw/latte --strict-cdnnpx ui8kit add footer-contacts{* 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-contacts.json
The ways to reach the team in a column: a glyph tile, the kind (Email, Phone) and the value.
Props (p): extras. *}
{var $v_extras = ($p['extras'] ?? null)}
{if og_t(og_gt(og_len(og_get($v_extras, ['contacts'])), 0))}
{capture $c_6}
{foreach og_l(og_get($v_extras, ['contacts'])) as $v_c}
{capture $c_5}
{capture $c_1}
{=og_include('icons/LucideIcon.latte', ['name' => og_s(og_get($v_c, ['icon'])), 'size' => 20])|noescape}
{/capture}
{=og_include('compose/Inline.latte', ['class' => 'flex size-10 shrink-0 items-center justify-center rounded bg-muted text-foreground', 'children' => (string) $c_1])|noescape}
{capture $c_4}
{capture $c_2}
{=og_text(og_get($v_c, ['title']))}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'sm', 'weight' => 'semibold', 'children' => (string) $c_2])|noescape}
{capture $c_3}
{=og_text(og_get($v_c, ['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' => '0', 'children' => (string) $c_4])|noescape}
{/capture}
{=og_include('compose/Group.latte', ['gap' => '4', 'align' => 'center', 'attrs' => og_attrs(['data-slot', 'footer-contact']), 'children' => (string) $c_5])|noescape}
{/foreach}
{/capture}
{=og_include('compose/Stack.latte', ['gap' => '4', 'align' => 'stretch', 'attrs' => og_attrs(['data-slot', 'footer-contacts']), 'children' => (string) $c_6])|noescape}
{/if}
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework jinja2 --dir src --registry-url https://registry.buildy.tw/jinja2 --strict-cdnnpx ui8kit add footer-contacts{#- 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-contacts.json
The ways to reach the team in a column: a glyph tile, the kind (Email, Phone) and the value.
Props (p): extras. -#}
{%- set v_extras = og_def(p['extras'], none) -%}
{%- if og_t(og_gt(og_len(og_get(v_extras, ['contacts'])), 0)) %}
{%- set c_6 -%}
{%- for v_c in og_l(og_get(v_extras, ['contacts'])) %}
{%- set c_5 -%}
{%- set c_1 -%}
{{ og_include('icons/lucide-icon.html.j2', {'p': {'Name': og_s(og_get(v_c, ['icon'])), 'Size': 20}}) }}
{%- endset -%}
{{ og_include('compose/inline.html.j2', {'p': {'Class': 'flex size-10 shrink-0 items-center justify-center rounded bg-muted text-foreground'}, 'children': c_1}) }}
{%- set c_4 -%}
{%- set c_2 -%}
{{ og_text(og_get(v_c, ['title'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_2}) }}
{%- set c_3 -%}
{{ og_text(og_get(v_c, ['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': '0'}, 'children': c_4}) }}
{%- endset -%}
{{ og_include('compose/group.html.j2', {'p': {'Gap': '4', 'Align': 'center', 'Attrs': og_attrs(['data-slot', 'footer-contact'])}, 'children': c_5}) }}
{%- endfor %}
{%- endset -%}
{{ og_include('compose/stack.html.j2', {'p': {'Gap': '4', 'Align': 'stretch', 'Attrs': og_attrs(['data-slot', 'footer-contacts'])}, 'children': c_6}) }}
{%- endif %}
Props
Names and types come from the xgen specs of the source. Standard HTML attributes (id, role, tabIndex, aria-*) pass through to the root element; the class prop is className in React.
The ways to reach the team in a column: a glyph tile, the kind (Email, Phone) and the value.
| Prop | Type | Default | Description |
|---|---|---|---|
| extras (required) | FooterExtras | - | the figures, points, contacts and channels |