Logo Ribbon
Logo Ribbon block
Install
npx ui8kit add logo-ribbonPulls in: compose, group, kit-box, kit-text, logo-cloud, logo-slot, presets, section-frame, stack, title, utils
Preview
Best Companies Use Our Service
Northwind
Lumen
Harbor
Summit
Orbit
Grove
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 logo-ribbon<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->
<!-- A heading over one centered row of logo slots (LogoSlot); the row and slot sizes come from the default preset. -->
<script lang="ts" module>
import type { Snippet } from "svelte";
import type { Logo } from "./logo-cloud.types";
export type LogoRibbonProps = {
id: string;
title: string;
logos: Logo[];
tone?: "default" | "muted";
density?: "roomy" | "default" | "compact";
landmarkLabel?: string;
};
</script>
<script lang="ts">
import Group from "../compose/Group.svelte";
import Stack from "../compose/Stack.svelte";
import Title from "../compose/Title.svelte";
import LogoSlot from "../components/logo-slot.svelte";
import SectionFrame from "../components/section-frame.svelte";
import { defaults } from "../presets/defaults";
import { cn } from "../utils";
let { id, title, logos, tone = "default", density = "default", landmarkLabel }: LogoRibbonProps = $props();
</script>
<SectionFrame
id={id}
tone={tone}
density={density}
measure="fill"
align="center"
class="py-0"
landmarkLabel={landmarkLabel}
>
<Stack gap="6" align="center" data-slot="logos-block">
<Title as={2} size="xl" weight="semibold" class="leading-7" id={(id + "-title")}>
{title}
</Title>
<Group
gap="0"
justify="center"
align="start"
class={cn("flex w-full flex-wrap", defaults.logos.row)}
data-slot="items"
>
{#each logos as logo (logo.id)}
<LogoSlot name={logo.name} icon={logo.icon} />
{/each}
</Group>
</Stack>
</SectionFrame>
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 logo-ribbon// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
/** A heading over one centered row of logo slots (LogoSlot); the row and slot sizes come from the default preset. */
import { type ReactNode } from "react";
import { Group, Stack, Title } from "../compose";
import { LogoSlot } from "../components/logo-slot";
import { SectionFrame } from "../components/section-frame";
import { defaults } from "../presets/defaults";
import { cn } from "../utils";
import type { Logo } from "./logo-cloud.types";
export type LogoRibbonProps = {
id: string;
title: string;
logos: Logo[];
tone?: "default" | "muted";
density?: "roomy" | "default" | "compact";
landmarkLabel?: string;
};
export function LogoRibbon({
id,
title,
logos,
tone = "default",
density = "default",
landmarkLabel,
}: LogoRibbonProps) {
return (
<SectionFrame
id={id}
tone={tone}
density={density}
measure="fill"
align="center"
className="py-0"
landmarkLabel={landmarkLabel}
>
<Stack gap="6" align="center" data-slot="logos-block">
<Title as={2} size="xl" weight="semibold" className="leading-7" id={(id + "-title")}>
{title}
</Title>
<Group
gap="0"
justify="center"
align="start"
className={cn("flex w-full flex-wrap", defaults.logos.row)}
data-slot="items"
>
{(logos ?? []).map((logo) => (
<LogoSlot key={logo.id} name={logo.name} icon={logo.icon} />
))}
</Group>
</Stack>
</SectionFrame>
);
}
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 logo-ribbon<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->
<!-- A heading over one centered row of logo slots (LogoSlot); the row and slot sizes come from the default preset. -->
<script lang="ts">
import type { Logo } from "./logo-cloud.types";
export type LogoRibbonProps = {
id: string;
title: string;
logos: Logo[];
tone?: "default" | "muted";
density?: "roomy" | "default" | "compact";
landmarkLabel?: string;
};
</script>
<script setup lang="ts">
import Group from "../compose/Group.vue";
import Stack from "../compose/Stack.vue";
import Title from "../compose/Title.vue";
import LogoSlot from "../components/logo-slot.vue";
import SectionFrame from "../components/section-frame.vue";
import { defaults } from "../presets/defaults";
import { cn } from "../utils";
const {
id,
title,
logos,
tone = "default",
density = "default",
landmarkLabel,
} = defineProps<LogoRibbonProps>();
</script>
<template>
<SectionFrame
:id="id"
:tone="tone"
:density="density"
measure="fill"
align="center"
class="py-0"
:landmarkLabel="landmarkLabel"
>
<Stack gap="6" align="center" data-slot="logos-block">
<Title :as="2" size="xl" weight="semibold" class="leading-7" :id="(id + '-title')">
{{ title }}
</Title>
<Group
gap="0"
justify="center"
align="start"
:class="cn('flex w-full flex-wrap', defaults.logos.row)"
data-slot="items"
>
<LogoSlot v-for="logo in logos" :key="logo.id" :name="logo.name" :icon="logo.icon" />
</Group>
</Stack>
</SectionFrame>
</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 logo-ribbon// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
/** A heading over one centered row of logo slots (LogoSlot); the row and slot sizes come from the default preset. */
import { For, type JSX } from "solid-js";
import { Group, Stack, Title } from "../compose";
import { LogoSlot } from "../components/logo-slot";
import { SectionFrame } from "../components/section-frame";
import { defaults } from "../presets/defaults";
import { cn } from "../utils";
import type { Logo } from "./logo-cloud.types";
export type LogoRibbonProps = {
id: string;
title: string;
logos: Logo[];
tone?: "default" | "muted";
density?: "roomy" | "default" | "compact";
landmarkLabel?: string;
};
export function LogoRibbon({
id,
title,
logos,
tone = "default",
density = "default",
landmarkLabel,
}: LogoRibbonProps) {
return (
<SectionFrame
id={id}
tone={tone}
density={density}
measure="fill"
align="center"
class="py-0"
landmarkLabel={landmarkLabel}
>
<Stack gap="6" align="center" data-slot="logos-block">
<Title as={2} size="xl" weight="semibold" class="leading-7" id={(id + "-title")}>
{title}
</Title>
<Group
gap="0"
justify="center"
align="start"
class={cn("flex w-full flex-wrap", defaults.logos.row)}
data-slot="items"
>
<For each={logos ?? []}>{(logo) => (
<LogoSlot name={logo.name} icon={logo.icon} />
)}</For>
</Group>
</Stack>
</SectionFrame>
);
}
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 logo-ribbon// 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/logo-ribbon.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/ui/text"
uiutils "github.com/ui8kit/codegen/generated/templ/orgutils"
)
// LogoRibbonProps are the props of LogoRibbon; the values are the JSON shapes of the TypeScript props.
type LogoRibbonProps struct {
Id any `json:"id"`
Title any `json:"title"`
Logos any `json:"logos"`
Tone any `json:"tone"`
Density any `json:"density"`
LandmarkLabel any `json:"landmarkLabel"`
}
// A heading over one centered row of logo slots (LogoSlot); the row and slot sizes come from the default preset.
templ LogoRibbon(p LogoRibbonProps) {
{{ vId := p.Id }}
{{ vTitle := p.Title }}
{{ vLogos := p.Logos }}
{{ vTone := uiutils.Def(p.Tone, "default") }}
{{ vDensity := uiutils.Def(p.Density, "default") }}
{{ vLandmarkLabel := p.LandmarkLabel }}
@SectionFrame(SectionFrameProps{Id: vId, Tone: vTone, Density: vDensity, Measure: "fill", Align: "center", Class: uiutils.Cnv("py-0"), LandmarkLabel: vLandmarkLabel}) {
@compose.Stack(compose.StackProps{Gap: "6", Align: "center", BoxProps: box.BoxProps{Attrs: uiutils.Attrs("data-slot", "logos-block")}}) {
@compose.Title(compose.TitleProps{As: "2", Size: "xl", Weight: "semibold", TextProps: text.TextProps{Class: "leading-7", Attrs: uiutils.Attrs("id", uiutils.Add(vId, "-title"))}}) {
{ uiutils.Text(vTitle) }
}
@compose.Group(compose.GroupProps{Gap: "0", Justify: "center", Align: "start", BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv("flex w-full flex-wrap", uiutils.Get(presetDefaults, "logos", "row"))), Attrs: uiutils.Attrs("data-slot", "items")}}) {
for _, vLogo := range uiutils.L(vLogos) {
@LogoSlot(LogoSlotProps{Name: uiutils.Get(vLogo, "name"), Icon: uiutils.Get(vLogo, "icon")})
}
}
}
}
}
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 logo-ribbon{#- 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/logo-ribbon.json
A heading over one centered row of logo slots (LogoSlot); the row and slot sizes come from the default preset.
Props (p): id, title, logos, tone, density, landmarkLabel. -#}
{%- set v_id = (p.id ?? null) -%}
{%- set v_title = (p.title ?? null) -%}
{%- set v_logos = (p.logos ?? null) -%}
{%- set v_tone = (p.tone ?? 'default') -%}
{%- set v_density = (p.density ?? 'default') -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- set c_4 -%}
{%- set c_3 -%}
{%- set c_1 -%}
{{ og_text(v_title) }}
{%- endset -%}
{{ include('compose/Title.html.twig', {'as': 2, 'size': 'xl', 'weight': 'semibold', 'class': 'leading-7', 'attrs': og_attrs(['id', og_add(v_id, '-title')]), 'children': c_1}, with_context = false) }}
{%- set c_2 -%}
{%- for v_logo in og_l(v_logos) %}
{{ include('blocks/logo-slot.html.twig', {'p': {'name': og_get(v_logo, ['name']), 'icon': og_get(v_logo, ['icon'])}}, with_context = false) }}
{%- endfor %}
{%- endset -%}
{{ include('compose/Group.html.twig', {'gap': '0', 'justify': 'center', 'align': 'start', 'class': og_s(og_cnv(['flex w-full flex-wrap', og_preset('blocks/presets/defaults.json', ['logos', 'row'])])), 'attrs': og_attrs(['data-slot', 'items']), 'children': c_2}, with_context = false) }}
{%- endset -%}
{{ include('compose/Stack.html.twig', {'gap': '6', 'align': 'center', 'attrs': og_attrs(['data-slot', 'logos-block']), 'children': c_3}, with_context = false) }}
{%- endset -%}
{{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'tone': v_tone, 'density': v_density, 'measure': 'fill', 'align': 'center', 'className': og_cnv(['py-0']), 'landmarkLabel': v_landmarkLabel}, 'children': og_markup(c_4)}, 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 logo-ribbon{* 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/logo-ribbon.json
A heading over one centered row of logo slots (LogoSlot); the row and slot sizes come from the default preset.
Props (p): id, title, logos, tone, density, landmarkLabel. *}
{var $v_id = ($p['id'] ?? null)}
{var $v_title = ($p['title'] ?? null)}
{var $v_logos = ($p['logos'] ?? null)}
{var $v_tone = ($p['tone'] ?? 'default')}
{var $v_density = ($p['density'] ?? 'default')}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{capture $c_4}
{capture $c_3}
{capture $c_1}
{=og_text($v_title)}
{/capture}
{=og_include('compose/Title.latte', ['as' => 2, 'size' => 'xl', 'weight' => 'semibold', 'class' => 'leading-7', 'attrs' => og_attrs(['id', og_add($v_id, '-title')]), 'children' => (string) $c_1])|noescape}
{capture $c_2}
{foreach og_l($v_logos) as $v_logo}
{=og_include('blocks/logo-slot.latte', ['p' => ['name' => og_get($v_logo, ['name']), 'icon' => og_get($v_logo, ['icon'])]])|noescape}
{/foreach}
{/capture}
{=og_include('compose/Group.latte', ['gap' => '0', 'justify' => 'center', 'align' => 'start', 'class' => og_s(og_cnv(['flex w-full flex-wrap', og_preset('blocks/presets/defaults.json', ['logos', 'row'])])), 'attrs' => og_attrs(['data-slot', 'items']), 'children' => (string) $c_2])|noescape}
{/capture}
{=og_include('compose/Stack.latte', ['gap' => '6', 'align' => 'center', 'attrs' => og_attrs(['data-slot', 'logos-block']), 'children' => (string) $c_3])|noescape}
{/capture}
{=og_include('blocks/section-frame.latte', ['p' => ['id' => $v_id, 'tone' => $v_tone, 'density' => $v_density, 'measure' => 'fill', 'align' => 'center', 'className' => og_cnv(['py-0']), 'landmarkLabel' => $v_landmarkLabel], 'children' => og_markup($c_4)])|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 logo-ribbon{#- 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/logo-ribbon.json
A heading over one centered row of logo slots (LogoSlot); the row and slot sizes come from the default preset.
Props (p): id, title, logos, tone, density, landmarkLabel. -#}
{%- set v_id = og_def(p['id'], none) -%}
{%- set v_title = og_def(p['title'], none) -%}
{%- set v_logos = og_def(p['logos'], none) -%}
{%- set v_tone = og_def(p['tone'], 'default') -%}
{%- set v_density = og_def(p['density'], 'default') -%}
{%- set v_landmarkLabel = og_def(p['landmarkLabel'], none) -%}
{%- set c_4 -%}
{%- set c_3 -%}
{%- set c_1 -%}
{{ og_text(v_title) }}
{%- endset -%}
{{ og_include('compose/title.html.j2', {'p': {'As': 2, 'Size': 'xl', 'Weight': 'semibold', 'Class': 'leading-7', 'Attrs': og_attrs(['id', og_add(v_id, '-title')])}, 'children': c_1}) }}
{%- set c_2 -%}
{%- for v_logo in og_l(v_logos) %}
{{ og_include('blocks/logo-slot.html.j2', {'p': {'name': og_get(v_logo, ['name']), 'icon': og_get(v_logo, ['icon'])}}) }}
{%- endfor %}
{%- endset -%}
{{ og_include('compose/group.html.j2', {'p': {'Gap': '0', 'Justify': 'center', 'Align': 'start', 'Class': og_s(og_cnv(['flex w-full flex-wrap', og_preset('blocks/presets/defaults.json', ['logos', 'row'])])), 'Attrs': og_attrs(['data-slot', 'items'])}, 'children': c_2}) }}
{%- endset -%}
{{ og_include('compose/stack.html.j2', {'p': {'Gap': '6', 'Align': 'center', 'Attrs': og_attrs(['data-slot', 'logos-block'])}, 'children': c_3}) }}
{%- endset -%}
{{ og_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'tone': v_tone, 'density': v_density, 'measure': 'fill', 'align': 'center', 'className': og_cnv(['py-0']), 'landmarkLabel': v_landmarkLabel}, 'children': og_markup(c_4)}) }}
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.
A heading over one centered row of logo slots (LogoSlot); the row and slot sizes come from the default preset.
| Prop | Type | Default | Description |
|---|---|---|---|
| id (required) | string | - | |
| title (required) | string | - | |
| logos (required) | Logo[] | - | |
| tone | "default" | "muted" | "default" | |
| density | "roomy" | "default" | "compact" | "default" | |
| 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 |