Footer Points
Footer Points component
Install
npx ui8kit add footer-pointsPulls in: compose, footer-split, group, kit-box, kit-text, lucide-icon, stack, text, utils
Preview
Why teams pick us
Fast by default
Clear structure
Safe forms
Ready for any language
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-points<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->
<!-- Four points with their glyphs in a column, under the tagline of FooterSplit. -->
<script lang="ts" module>
import type { Snippet } from "svelte";
import type { FooterExtras, FooterSplitLabels } from "../blocks/footer-split.types";
export type FooterPointsProps = {
extras: FooterExtras;
title: string;
};
</script>
<script lang="ts">
import Group from "../compose/Group.svelte";
import LucideIcon from "../icons/LucideIcon.svelte";
import Stack from "../compose/Stack.svelte";
import Text from "../compose/Text.svelte";
let { extras, title }: FooterPointsProps = $props();
</script>
{#if ((extras.points?.length ?? 0) > 0)}
<Stack gap="4" align="start" data-slot="footer-points">
<Text size="sm" weight="semibold">
{title}
</Text>
{#each extras.points as p, i (p.id)}
{#if (i < 4)}
<Group gap="2" align="center" data-slot="footer-point">
<LucideIcon name={p.icon} size={16} />
<Text size="sm">
{p.title}
</Text>
</Group>
{/if}
{/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-points// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
/** Four points with their glyphs in a column, under the tagline of FooterSplit. */
import { Fragment, type ReactNode } from "react";
import { Group, Stack, Text } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import type { FooterExtras, FooterSplitLabels } from "../blocks/footer-split.types";
export type FooterPointsProps = {
extras: FooterExtras;
title: string;
};
export function FooterPoints({ extras, title }: FooterPointsProps) {
return (
<>
{((extras.points?.length ?? 0) > 0) ? (
<Stack gap="4" align="start" data-slot="footer-points">
<Text size="sm" weight="semibold">
{title}
</Text>
{(extras.points ?? []).map((p, i) => (
<Fragment key={p.id}>
{(i < 4) ? (
<Group gap="2" align="center" data-slot="footer-point">
<LucideIcon name={p.icon} size={16} />
<Text size="sm">
{p.title}
</Text>
</Group>
) : null}
</Fragment>
))}
</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-points<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->
<!-- Four points with their glyphs in a column, under the tagline of FooterSplit. -->
<script lang="ts">
import type { FooterExtras, FooterSplitLabels } from "../blocks/footer-split.types";
export type FooterPointsProps = {
extras: FooterExtras;
title: string;
};
</script>
<script setup lang="ts">
import Group from "../compose/Group.vue";
import LucideIcon from "../icons/LucideIcon.vue";
import Stack from "../compose/Stack.vue";
import Text from "../compose/Text.vue";
const { extras, title } = defineProps<FooterPointsProps>();
</script>
<template>
<Stack v-if="((extras.points?.length ?? 0) > 0)" gap="4" align="start" data-slot="footer-points">
<Text size="sm" weight="semibold">
{{ title }}
</Text>
<template v-for="(p, i) in extras.points" :key="p.id">
<Group v-if="(i < 4)" gap="2" align="center" data-slot="footer-point">
<LucideIcon :name="p.icon" :size="16" />
<Text size="sm">
{{ p.title }}
</Text>
</Group>
</template>
</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-points// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
/** Four points with their glyphs in a column, under the tagline of FooterSplit. */
import { For, type JSX } from "solid-js";
import { Group, Stack, Text } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import type { FooterExtras, FooterSplitLabels } from "../blocks/footer-split.types";
export type FooterPointsProps = {
extras: FooterExtras;
title: string;
};
export function FooterPoints({ extras, title }: FooterPointsProps) {
return (
<>
{((extras.points?.length ?? 0) > 0) ? (
<Stack gap="4" align="start" data-slot="footer-points">
<Text size="sm" weight="semibold">
{title}
</Text>
<For each={extras.points ?? []}>{(p, iOf) => { const i = iOf(); return (
<>
{(i < 4) ? (
<Group gap="2" align="center" data-slot="footer-point">
<LucideIcon name={p.icon} size={16} />
<Text size="sm">
{p.title}
</Text>
</Group>
) : null}
</>
); }}</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-points// 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-points.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"
)
// FooterPointsProps are the props of FooterPoints; the values are the JSON shapes of the TypeScript props.
type FooterPointsProps struct {
Extras any `json:"extras"`
Title any `json:"title"`
}
// Four points with their glyphs in a column, under the tagline of FooterSplit.
templ FooterPoints(p FooterPointsProps) {
{{ vExtras := p.Extras }}
{{ vTitle := p.Title }}
if uiutils.Gt(uiutils.Len(uiutils.Get(vExtras, "points")), float64(0)) {
@compose.Stack(compose.StackProps{Gap: "4", Align: "start", BoxProps: box.BoxProps{Attrs: uiutils.Attrs("data-slot", "footer-points")}}) {
@compose.Text(compose.TextProps{Size: "sm", Weight: "semibold", TextProps: text.TextProps{}}) {
{ uiutils.Text(vTitle) }
}
for vI, vP := range uiutils.L(uiutils.Get(vExtras, "points")) {
if uiutils.Lt(float64(vI), float64(4)) {
@compose.Group(compose.GroupProps{Gap: "2", Align: "center", BoxProps: box.BoxProps{Attrs: uiutils.Attrs("data-slot", "footer-point")}}) {
@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(uiutils.Get(vP, "icon")), Size: 16})
@compose.Text(compose.TextProps{Size: "sm", TextProps: text.TextProps{}}) {
{ uiutils.Text(uiutils.Get(vP, "title")) }
}
}
}
}
}
}
}
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-points{#- 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-points.json
Four points with their glyphs in a column, under the tagline of FooterSplit.
Props (p): extras, title. -#}
{%- set v_extras = (p.extras ?? null) -%}
{%- set v_title = (p.title ?? null) -%}
{%- if og_t(og_gt(og_len(og_get(v_extras, ['points'])), 0)) %}
{%- set c_4 -%}
{%- set c_1 -%}
{{ og_text(v_title) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': 'sm', 'weight': 'semibold', 'children': c_1}, with_context = false) }}
{%- for v_p in og_l(og_get(v_extras, ['points'])) %}
{%- set v_i = loop.index0 -%}
{%- if og_t(og_lt(v_i, 4)) %}
{%- set c_3 -%}
{{ include('icons/LucideIcon.html.twig', {'name': og_s(og_get(v_p, ['icon'])), 'size': 16}, with_context = false) }}
{%- set c_2 -%}
{{ og_text(og_get(v_p, ['title'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': 'sm', 'children': c_2}, with_context = false) }}
{%- endset -%}
{{ include('compose/Group.html.twig', {'gap': '2', 'align': 'center', 'attrs': og_attrs(['data-slot', 'footer-point']), 'children': c_3}, with_context = false) }}
{%- endif %}
{%- endfor %}
{%- endset -%}
{{ include('compose/Stack.html.twig', {'gap': '4', 'align': 'start', 'attrs': og_attrs(['data-slot', 'footer-points']), 'children': c_4}, 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-points{* 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-points.json
Four points with their glyphs in a column, under the tagline of FooterSplit.
Props (p): extras, title. *}
{var $v_extras = ($p['extras'] ?? null)}
{var $v_title = ($p['title'] ?? null)}
{if og_t(og_gt(og_len(og_get($v_extras, ['points'])), 0))}
{capture $c_4}
{capture $c_1}
{=og_text($v_title)}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'sm', 'weight' => 'semibold', 'children' => (string) $c_1])|noescape}
{foreach og_l(og_get($v_extras, ['points'])) as $v_p}
{var $v_i = $iterator->counter0}
{if og_t(og_lt($v_i, 4))}
{capture $c_3}
{=og_include('icons/LucideIcon.latte', ['name' => og_s(og_get($v_p, ['icon'])), 'size' => 16])|noescape}
{capture $c_2}
{=og_text(og_get($v_p, ['title']))}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'sm', 'children' => (string) $c_2])|noescape}
{/capture}
{=og_include('compose/Group.latte', ['gap' => '2', 'align' => 'center', 'attrs' => og_attrs(['data-slot', 'footer-point']), 'children' => (string) $c_3])|noescape}
{/if}
{/foreach}
{/capture}
{=og_include('compose/Stack.latte', ['gap' => '4', 'align' => 'start', 'attrs' => og_attrs(['data-slot', 'footer-points']), 'children' => (string) $c_4])|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-points{#- 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-points.json
Four points with their glyphs in a column, under the tagline of FooterSplit.
Props (p): extras, title. -#}
{%- set v_extras = og_def(p['extras'], none) -%}
{%- set v_title = og_def(p['title'], none) -%}
{%- if og_t(og_gt(og_len(og_get(v_extras, ['points'])), 0)) %}
{%- set c_4 -%}
{%- set c_1 -%}
{{ og_text(v_title) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_1}) }}
{%- for v_p in og_l(og_get(v_extras, ['points'])) %}
{%- set v_i = loop.index0 -%}
{%- if og_t(og_lt(v_i, 4)) %}
{%- set c_3 -%}
{{ og_include('icons/lucide-icon.html.j2', {'p': {'Name': og_s(og_get(v_p, ['icon'])), 'Size': 16}}) }}
{%- set c_2 -%}
{{ og_text(og_get(v_p, ['title'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'sm'}, 'children': c_2}) }}
{%- endset -%}
{{ og_include('compose/group.html.j2', {'p': {'Gap': '2', 'Align': 'center', 'Attrs': og_attrs(['data-slot', 'footer-point'])}, 'children': c_3}) }}
{%- endif %}
{%- endfor %}
{%- endset -%}
{{ og_include('compose/stack.html.j2', {'p': {'Gap': '4', 'Align': 'start', 'Attrs': og_attrs(['data-slot', 'footer-points'])}, 'children': c_4}) }}
{%- 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.
Four points with their glyphs in a column, under the tagline of FooterSplit.
| Prop | Type | Default | Description |
|---|---|---|---|
| extras (required) | FooterExtras | - | the figures, points, contacts and channels |
| title (required) | string | - |