Footer Sitemap
Footer Sitemap component
Install
npx ui8kit add footer-sitemapPulls in: compose, kit-link, link, lucide-icon, utils
Preview
No static preview for this item: it needs content or a parent that this page cannot supply. The code is below.
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-sitemap<!-- 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 sitemap link of FooterSplit: an arrow and the word, only where the app gives the address (no address, no
link).
-->
<script lang="ts" module>
import type { Snippet } from "svelte";
export type FooterSitemapProps = {
href?: string;
label: string;
};
</script>
<script lang="ts">
import Link from "../compose/Link.svelte";
import LucideIcon from "../icons/LucideIcon.svelte";
import { urlOf } from "../utils";
let { href, label }: FooterSitemapProps = $props();
</script>
{#if href}
<Link href={urlOf(href)} size="sm" data-slot="footer-sitemap">
<LucideIcon name="arrow-right" size={16} />
{label}
</Link>
{/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-sitemap// 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 sitemap link of FooterSplit: an arrow and the word, only where the app gives the address (no address, no
* link).
*/
import { type ReactNode } from "react";
import { Link } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import { urlOf } from "../utils";
export type FooterSitemapProps = {
href?: string;
label: string;
};
export function FooterSitemap({ href, label }: FooterSitemapProps) {
return (
<>
{href ? (
<Link href={urlOf(href)} size="sm" data-slot="footer-sitemap">
<LucideIcon name="arrow-right" size={16} />
{label}
</Link>
) : 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-sitemap<!-- 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 sitemap link of FooterSplit: an arrow and the word, only where the app gives the address (no address, no
link).
-->
<script lang="ts">
export type FooterSitemapProps = {
href?: string;
label: string;
};
</script>
<script setup lang="ts">
import Link from "../compose/Link.vue";
import LucideIcon from "../icons/LucideIcon.vue";
import { urlOf } from "../utils";
const { href, label } = defineProps<FooterSitemapProps>();
</script>
<template>
<Link v-if="href" :href="urlOf(href)" size="sm" data-slot="footer-sitemap">
<LucideIcon name="arrow-right" :size="16" />
{{ label }}
</Link>
</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-sitemap// 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 sitemap link of FooterSplit: an arrow and the word, only where the app gives the address (no address, no
* link).
*/
import { type JSX } from "solid-js";
import { Link } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import { urlOf } from "../utils";
export type FooterSitemapProps = {
href?: string;
label: string;
};
export function FooterSitemap({ href, label }: FooterSitemapProps) {
return (
<>
{href ? (
<Link href={urlOf(href)} size="sm" data-slot="footer-sitemap">
<LucideIcon name="arrow-right" size={16} />
{label}
</Link>
) : 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-sitemap// 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-sitemap.json
package blocks
import (
"github.com/ui8kit/codegen/generated/templ/compose"
"github.com/ui8kit/codegen/generated/templ/icons"
"github.com/ui8kit/codegen/generated/templ/ui/link"
uiutils "github.com/ui8kit/codegen/generated/templ/orgutils"
)
// FooterSitemapProps are the props of FooterSitemap; the values are the JSON shapes of the TypeScript props.
type FooterSitemapProps struct {
Href any `json:"href"`
Label any `json:"label"`
}
// The sitemap link of FooterSplit: an arrow and the word, only where the app gives the address (no address, no link).
templ FooterSitemap(p FooterSitemapProps) {
{{ vHref := p.Href }}
{{ vLabel := p.Label }}
if uiutils.T(vHref) {
@compose.Link(compose.LinkProps{Size: "sm", LinkProps: link.LinkProps{Href: uiutils.URL(vHref, false), Attrs: uiutils.Attrs("data-slot", "footer-sitemap")}}) {
@icons.LucideIcon(icons.LucideIconProps{Name: "arrow-right", Size: 16})
{ uiutils.Text(vLabel) }
}
}
}
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-sitemap{#- 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-sitemap.json
The sitemap link of FooterSplit: an arrow and the word, only where the app gives the address (no address, no link).
Props (p): href, label. -#}
{%- set v_href = (p.href ?? null) -%}
{%- set v_label = (p.label ?? null) -%}
{%- if og_t(v_href) %}
{%- set c_1 -%}
{{ include('icons/LucideIcon.html.twig', {'name': 'arrow-right', 'size': 16}, with_context = false) }}
{{ og_text(v_label) }}
{%- endset -%}
{{ include('compose/Link.html.twig', {'href': og_url(og_s(v_href)), 'size': 'sm', 'attrs': og_attrs(['data-slot', 'footer-sitemap']), 'children': c_1}, 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-sitemap{* 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-sitemap.json
The sitemap link of FooterSplit: an arrow and the word, only where the app gives the address (no address, no link).
Props (p): href, label. *}
{var $v_href = ($p['href'] ?? null)}
{var $v_label = ($p['label'] ?? null)}
{if og_t($v_href)}
{capture $c_1}
{=og_include('icons/LucideIcon.latte', ['name' => 'arrow-right', 'size' => 16])|noescape}
{=og_text($v_label)}
{/capture}
{=og_include('compose/Link.latte', ['href' => og_url(og_s($v_href)), 'size' => 'sm', 'attrs' => og_attrs(['data-slot', 'footer-sitemap']), 'children' => (string) $c_1])|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-sitemap{#- 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-sitemap.json
The sitemap link of FooterSplit: an arrow and the word, only where the app gives the address (no address, no link).
Props (p): href, label. -#}
{%- set v_href = og_def(p['href'], none) -%}
{%- set v_label = og_def(p['label'], none) -%}
{%- if og_t(v_href) %}
{%- set c_1 -%}
{{ og_include('icons/lucide-icon.html.j2', {'p': {'Name': 'arrow-right', 'Size': 16}}) }}
{{ og_text(v_label) }}
{%- endset -%}
{{ og_include('compose/link.html.j2', {'p': {'Href': og_url(og_s(v_href)), 'Size': 'sm', 'Attrs': og_attrs(['data-slot', 'footer-sitemap'])}, 'children': c_1}) }}
{%- 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 sitemap link of FooterSplit: an arrow and the word, only where the app gives the address (no address, no link).
| Prop | Type | Default | Description |
|---|---|---|---|
| href | string | - | the address of the sitemap; none: nothing |
| label (required) | string | - |