Skip to content
ui8kit

component / components

Logo Slot

Logo Slot component

Install

npx ui8kit add logo-slot

Pulls in: box, compose, kit-box, kit-text, lucide-icon, presets, text, utils

Preview

Lumen

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-cdn
npx ui8kit add logo-slot
components/logo-slot.svelte
<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->
<!-- One logo of a logo ribbon: a fixed-size slot with a Lucide glyph; the name is read by screen readers only. -->
<script lang="ts" module>
  import type { Snippet } from "svelte";

  export type LogoSlotProps = {
    name: string;
    icon: string;
  };
</script>

<script lang="ts">
  import Box from "../compose/Box.svelte";
  import LucideIcon from "../icons/LucideIcon.svelte";
  import Text from "../compose/Text.svelte";
  import { defaults } from "../presets/defaults";
  import { cn } from "../utils";

  let { name, icon }: LogoSlotProps = $props();
</script>

<Box
  class={cn("flex shrink-0 items-center justify-center text-muted-foreground", defaults.logos.slot)}
  data-slot="logo-slot"
>
  <LucideIcon name={icon} size={defaults.logos.glyph} />
  <Text size="sm" weight="semibold" class="sr-only">
    {name}
  </Text>
</Box>

Svelte registry item (JSON)

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-cdn
npx ui8kit add logo-slot
components/logo-slot.tsx
// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
/** One logo of a logo ribbon: a fixed-size slot with a Lucide glyph; the name is read by screen readers only. */
import { type ReactNode } from "react";
import { Box, Text } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import { defaults } from "../presets/defaults";
import { cn } from "../utils";

export type LogoSlotProps = {
  name: string;
  icon: string;
};

export function LogoSlot({ name, icon }: LogoSlotProps) {
  return (
    <Box
      className={cn(
        "flex shrink-0 items-center justify-center text-muted-foreground",
        defaults.logos.slot
      )}
      data-slot="logo-slot"
    >
      <LucideIcon name={icon} size={defaults.logos.glyph} />
      <Text size="sm" weight="semibold" className="sr-only">
        {name}
      </Text>
    </Box>
  );
}

React registry item (JSON)

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-cdn
npx ui8kit add logo-slot
components/logo-slot.vue
<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->
<!-- One logo of a logo ribbon: a fixed-size slot with a Lucide glyph; the name is read by screen readers only. -->
<script lang="ts">
export type LogoSlotProps = {
  name: string;
  icon: string;
};
</script>

<script setup lang="ts">
import Box from "../compose/Box.vue";
import LucideIcon from "../icons/LucideIcon.vue";
import Text from "../compose/Text.vue";
import { defaults } from "../presets/defaults";
import { cn } from "../utils";

const { name, icon } = defineProps<LogoSlotProps>();
</script>

<template>
  <Box
    :class="cn('flex shrink-0 items-center justify-center text-muted-foreground', defaults.logos.slot)"
    data-slot="logo-slot"
  >
    <LucideIcon :name="icon" :size="defaults.logos.glyph" />
    <Text size="sm" weight="semibold" class="sr-only">
      {{ name }}
    </Text>
  </Box>
</template>

Vue registry item (JSON)

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-cdn
npx ui8kit add logo-slot
components/logo-slot.tsx
// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
/** One logo of a logo ribbon: a fixed-size slot with a Lucide glyph; the name is read by screen readers only. */
import { type JSX } from "solid-js";
import { Box, Text } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import { defaults } from "../presets/defaults";
import { cn } from "../utils";

export type LogoSlotProps = {
  name: string;
  icon: string;
};

export function LogoSlot({ name, icon }: LogoSlotProps) {
  return (
    <Box
      class={cn("flex shrink-0 items-center justify-center text-muted-foreground", defaults.logos.slot)}
      data-slot="logo-slot"
    >
      <LucideIcon name={icon} size={defaults.logos.glyph} />
      <Text size="sm" weight="semibold" class="sr-only">
        {name}
      </Text>
    </Box>
  );
}

Solid registry item (JSON)

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-cdn
npx ui8kit add logo-slot
blocks/logo-slot.templ
// 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-slot.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"
)

// LogoSlotProps are the props of LogoSlot; the values are the JSON shapes of the TypeScript props.
type LogoSlotProps struct {
	Name any `json:"name"`
	Icon any `json:"icon"`
}

// One logo of a logo ribbon: a fixed-size slot with a Lucide glyph; the name is read by screen readers only.
templ LogoSlot(p LogoSlotProps) {
	{{ vName := p.Name }}
	{{ vIcon := p.Icon }}
	@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv("flex shrink-0 items-center justify-center text-muted-foreground", uiutils.Get(presetDefaults, "logos", "slot"))), Attrs: uiutils.Attrs("data-slot", "logo-slot")}}) {
		@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(vIcon), Size: uiutils.I(uiutils.Get(presetDefaults, "logos", "glyph"))})
		@compose.Text(compose.TextProps{Size: "sm", Weight: "semibold", TextProps: text.TextProps{Class: "sr-only"}}) {
			{ uiutils.Text(vName) }
		}
	}
}

templ registry item (JSON)

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-cdn
npx ui8kit add logo-slot
blocks/logo-slot.html.twig
{#- 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-slot.json
    One logo of a logo ribbon: a fixed-size slot with a Lucide glyph; the name is read by screen readers only.
    Props (p): name, icon. -#}
{%- set v_name = (p.name ?? null) -%}
{%- set v_icon = (p.icon ?? null) -%}
{%- set c_2 -%}
  {{ include('icons/LucideIcon.html.twig', {'name': og_s(v_icon), 'size': og_i(og_preset('blocks/presets/defaults.json', ['logos', 'glyph']))}, with_context = false) }}
  {%- set c_1 -%}
    {{ og_text(v_name) }}
  {%- endset -%}
  {{ include('compose/Text.html.twig', {'size': 'sm', 'weight': 'semibold', 'class': 'sr-only', 'children': c_1}, with_context = false) }}
{%- endset -%}
{{ include('compose/Box.html.twig', {'class': og_s(og_cnv(['flex shrink-0 items-center justify-center text-muted-foreground', og_preset('blocks/presets/defaults.json', ['logos', 'slot'])])), 'attrs': og_attrs(['data-slot', 'logo-slot']), 'children': c_2}, with_context = false) }}

Twig registry item (JSON)

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-cdn
npx ui8kit add logo-slot
blocks/logo-slot.latte
{* 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-slot.json
    One logo of a logo ribbon: a fixed-size slot with a Lucide glyph; the name is read by screen readers only.
    Props (p): name, icon. *}
{var $v_name = ($p['name'] ?? null)}
{var $v_icon = ($p['icon'] ?? null)}
{capture $c_2}
  {=og_include('icons/LucideIcon.latte', ['name' => og_s($v_icon), 'size' => og_i(og_preset('blocks/presets/defaults.json', ['logos', 'glyph']))])|noescape}
  {capture $c_1}
    {=og_text($v_name)}
  {/capture}
  {=og_include('compose/Text.latte', ['size' => 'sm', 'weight' => 'semibold', 'class' => 'sr-only', 'children' => (string) $c_1])|noescape}
{/capture}
{=og_include('compose/Box.latte', ['class' => og_s(og_cnv(['flex shrink-0 items-center justify-center text-muted-foreground', og_preset('blocks/presets/defaults.json', ['logos', 'slot'])])), 'attrs' => og_attrs(['data-slot', 'logo-slot']), 'children' => (string) $c_2])|noescape}

Latte registry item (JSON)

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-cdn
npx ui8kit add logo-slot
blocks/logo-slot.html.j2
{#- 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-slot.json
    One logo of a logo ribbon: a fixed-size slot with a Lucide glyph; the name is read by screen readers only.
    Props (p): name, icon. -#}
{%- set v_name = og_def(p['name'], none) -%}
{%- set v_icon = og_def(p['icon'], none) -%}
{%- set c_2 -%}
  {{ og_include('icons/lucide-icon.html.j2', {'p': {'Name': og_s(v_icon), 'Size': og_i(og_preset('blocks/presets/defaults.json', ['logos', 'glyph']))}}) }}
  {%- set c_1 -%}
    {{ og_text(v_name) }}
  {%- endset -%}
  {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'semibold', 'Class': 'sr-only'}, 'children': c_1}) }}
{%- endset -%}
{{ og_include('compose/box.html.j2', {'p': {'Class': og_s(og_cnv(['flex shrink-0 items-center justify-center text-muted-foreground', og_preset('blocks/presets/defaults.json', ['logos', 'slot'])])), 'Attrs': og_attrs(['data-slot', 'logo-slot'])}, 'children': c_2}) }}

Jinja2 registry item (JSON)

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.

One logo of a logo ribbon: a fixed-size slot with a Lucide glyph; the name is read by screen readers only.

Props of LogoSlot
PropTypeDefault Description
name (required)string-
icon (required)string-

Used in