Quote Logo Tiles
Quote Logo Tiles component
Install
npx ui8kit add quote-logo-tilesPulls in: box, compose, group, kit-box, kit-text, lucide-icon, quote-split, testimonial-grid, text, utils
Preview
Northwind
Lumen
Harbor
Summit
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 quote-logo-tiles<!-- 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 customer names with their glyphs in tiles of two columns, under the quote of QuoteSplit. -->
<script lang="ts" module>
import type { Snippet } from "svelte";
import type { QuoteExtras } from "../blocks/quote-split.types";
import type { QuoteLabels } from "../blocks/testimonial-grid.types";
export type QuoteLogoTilesProps = {
extras: QuoteExtras;
};
</script>
<script lang="ts">
import Box from "../compose/Box.svelte";
import Group from "../compose/Group.svelte";
import LucideIcon from "../icons/LucideIcon.svelte";
import Text from "../compose/Text.svelte";
let { extras }: QuoteLogoTilesProps = $props();
</script>
<Box class="grid grid-cols-2 gap-4" data-slot="quote-logos">
{#each extras.logos as l, i (l.id)}
{#if (i < 4)}
<Group
gap="2"
align="center"
justify="center"
class="rounded bg-card inset-ring inset-ring-border p-4 text-muted-foreground"
data-slot="quote-logo"
>
<LucideIcon name={l.icon} size={20} />
<Text size="sm" weight="semibold">
{l.name}
</Text>
</Group>
{/if}
{/each}
</Box>
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 quote-logo-tiles// 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 customer names with their glyphs in tiles of two columns, under the quote of QuoteSplit. */
import { Fragment, type ReactNode } from "react";
import { Box, Group, Text } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import type { QuoteExtras } from "../blocks/quote-split.types";
import type { QuoteLabels } from "../blocks/testimonial-grid.types";
export type QuoteLogoTilesProps = {
extras: QuoteExtras;
};
export function QuoteLogoTiles({ extras }: QuoteLogoTilesProps) {
return (
<Box className="grid grid-cols-2 gap-4" data-slot="quote-logos">
{(extras.logos ?? []).map((l, i) => (
<Fragment key={l.id}>
{(i < 4) ? (
<Group
gap="2"
align="center"
justify="center"
className="rounded bg-card inset-ring inset-ring-border p-4 text-muted-foreground"
data-slot="quote-logo"
>
<LucideIcon name={l.icon} size={20} />
<Text size="sm" weight="semibold">
{l.name}
</Text>
</Group>
) : null}
</Fragment>
))}
</Box>
);
}
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 quote-logo-tiles<!-- 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 customer names with their glyphs in tiles of two columns, under the quote of QuoteSplit. -->
<script lang="ts">
import type { QuoteExtras } from "../blocks/quote-split.types";
import type { QuoteLabels } from "../blocks/testimonial-grid.types";
export type QuoteLogoTilesProps = {
extras: QuoteExtras;
};
</script>
<script setup lang="ts">
import Box from "../compose/Box.vue";
import Group from "../compose/Group.vue";
import LucideIcon from "../icons/LucideIcon.vue";
import Text from "../compose/Text.vue";
const { extras } = defineProps<QuoteLogoTilesProps>();
</script>
<template>
<Box class="grid grid-cols-2 gap-4" data-slot="quote-logos">
<template v-for="(l, i) in extras.logos" :key="l.id">
<Group v-if="(i < 4)"
gap="2"
align="center"
justify="center"
class="rounded bg-card inset-ring inset-ring-border p-4 text-muted-foreground"
data-slot="quote-logo"
>
<LucideIcon :name="l.icon" :size="20" />
<Text size="sm" weight="semibold">
{{ l.name }}
</Text>
</Group>
</template>
</Box>
</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 quote-logo-tiles// 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 customer names with their glyphs in tiles of two columns, under the quote of QuoteSplit. */
import { For, type JSX } from "solid-js";
import { Box, Group, Text } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import type { QuoteExtras } from "../blocks/quote-split.types";
import type { QuoteLabels } from "../blocks/testimonial-grid.types";
export type QuoteLogoTilesProps = {
extras: QuoteExtras;
};
export function QuoteLogoTiles({ extras }: QuoteLogoTilesProps) {
return (
<Box class="grid grid-cols-2 gap-4" data-slot="quote-logos">
<For each={extras.logos ?? []}>{(l, iOf) => { const i = iOf(); return (
<>
{(i < 4) ? (
<Group
gap="2"
align="center"
justify="center"
class="rounded bg-card inset-ring inset-ring-border p-4 text-muted-foreground"
data-slot="quote-logo"
>
<LucideIcon name={l.icon} size={20} />
<Text size="sm" weight="semibold">
{l.name}
</Text>
</Group>
) : null}
</>
); }}</For>
</Box>
);
}
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 quote-logo-tiles// 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/quote-logo-tiles.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"
)
// QuoteLogoTilesProps are the props of QuoteLogoTiles; the values are the JSON shapes of the TypeScript props.
type QuoteLogoTilesProps struct {
Extras any `json:"extras"`
}
// Four customer names with their glyphs in tiles of two columns, under the quote of QuoteSplit.
templ QuoteLogoTiles(p QuoteLogoTilesProps) {
{{ vExtras := p.Extras }}
@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: "grid grid-cols-2 gap-4", Attrs: uiutils.Attrs("data-slot", "quote-logos")}}) {
for vI, vL := range uiutils.L(uiutils.Get(vExtras, "logos")) {
if uiutils.Lt(float64(vI), float64(4)) {
@compose.Group(compose.GroupProps{Gap: "2", Align: "center", Justify: "center", BoxProps: box.BoxProps{Class: "rounded bg-card inset-ring inset-ring-border p-4 text-muted-foreground", Attrs: uiutils.Attrs("data-slot", "quote-logo")}}) {
@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(uiutils.Get(vL, "icon")), Size: 20})
@compose.Text(compose.TextProps{Size: "sm", Weight: "semibold", TextProps: text.TextProps{}}) {
{ uiutils.Text(uiutils.Get(vL, "name")) }
}
}
}
}
}
}
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 quote-logo-tiles{#- 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/quote-logo-tiles.json
Four customer names with their glyphs in tiles of two columns, under the quote of QuoteSplit.
Props (p): extras. -#}
{%- set v_extras = (p.extras ?? null) -%}
{%- set c_3 -%}
{%- for v_l in og_l(og_get(v_extras, ['logos'])) %}
{%- set v_i = loop.index0 -%}
{%- if og_t(og_lt(v_i, 4)) %}
{%- set c_2 -%}
{{ include('icons/LucideIcon.html.twig', {'name': og_s(og_get(v_l, ['icon'])), 'size': 20}, with_context = false) }}
{%- set c_1 -%}
{{ og_text(og_get(v_l, ['name'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': 'sm', 'weight': 'semibold', 'children': c_1}, with_context = false) }}
{%- endset -%}
{{ include('compose/Group.html.twig', {'gap': '2', 'align': 'center', 'justify': 'center', 'class': 'rounded bg-card inset-ring inset-ring-border p-4 text-muted-foreground', 'attrs': og_attrs(['data-slot', 'quote-logo']), 'children': c_2}, with_context = false) }}
{%- endif %}
{%- endfor %}
{%- endset -%}
{{ include('compose/Box.html.twig', {'class': 'grid grid-cols-2 gap-4', 'attrs': og_attrs(['data-slot', 'quote-logos']), 'children': c_3}, with_context = false) }}
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 quote-logo-tiles{* 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/quote-logo-tiles.json
Four customer names with their glyphs in tiles of two columns, under the quote of QuoteSplit.
Props (p): extras. *}
{var $v_extras = ($p['extras'] ?? null)}
{capture $c_3}
{foreach og_l(og_get($v_extras, ['logos'])) as $v_l}
{var $v_i = $iterator->counter0}
{if og_t(og_lt($v_i, 4))}
{capture $c_2}
{=og_include('icons/LucideIcon.latte', ['name' => og_s(og_get($v_l, ['icon'])), 'size' => 20])|noescape}
{capture $c_1}
{=og_text(og_get($v_l, ['name']))}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'sm', 'weight' => 'semibold', 'children' => (string) $c_1])|noescape}
{/capture}
{=og_include('compose/Group.latte', ['gap' => '2', 'align' => 'center', 'justify' => 'center', 'class' => 'rounded bg-card inset-ring inset-ring-border p-4 text-muted-foreground', 'attrs' => og_attrs(['data-slot', 'quote-logo']), 'children' => (string) $c_2])|noescape}
{/if}
{/foreach}
{/capture}
{=og_include('compose/Box.latte', ['class' => 'grid grid-cols-2 gap-4', 'attrs' => og_attrs(['data-slot', 'quote-logos']), 'children' => (string) $c_3])|noescape}
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 quote-logo-tiles{#- 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/quote-logo-tiles.json
Four customer names with their glyphs in tiles of two columns, under the quote of QuoteSplit.
Props (p): extras. -#}
{%- set v_extras = og_def(p['extras'], none) -%}
{%- set c_3 -%}
{%- for v_l in og_l(og_get(v_extras, ['logos'])) %}
{%- set v_i = loop.index0 -%}
{%- if og_t(og_lt(v_i, 4)) %}
{%- set c_2 -%}
{{ og_include('icons/lucide-icon.html.j2', {'p': {'Name': og_s(og_get(v_l, ['icon'])), 'Size': 20}}) }}
{%- set c_1 -%}
{{ og_text(og_get(v_l, ['name'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_1}) }}
{%- endset -%}
{{ og_include('compose/group.html.j2', {'p': {'Gap': '2', 'Align': 'center', 'Justify': 'center', 'Class': 'rounded bg-card inset-ring inset-ring-border p-4 text-muted-foreground', 'Attrs': og_attrs(['data-slot', 'quote-logo'])}, 'children': c_2}) }}
{%- endif %}
{%- endfor %}
{%- endset -%}
{{ og_include('compose/box.html.j2', {'p': {'Class': 'grid grid-cols-2 gap-4', 'Attrs': og_attrs(['data-slot', 'quote-logos'])}, 'children': c_3}) }}
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 customer names with their glyphs in tiles of two columns, under the quote of QuoteSplit.
| Prop | Type | Default | Description |
|---|---|---|---|
| extras (required) | QuoteExtras | - | the figures, logos and rating summary |