Veil UI
Components

Logo Cloud

A responsive grid of customer or partner logos.

Installation

$ npx veil-ui@latest add logo-cloud

Usage

import { LogoCloud } from "@/components/ui/logo-cloud";

<LogoCloud
  items={[
    { name: "Acme", src: "/logos/acme.svg" },
    { name: "Globex", href: "https://globex.example" },
  ]}
/>;

Examples

Basic

  • Acme
  • Globex
  • Initech
  • Umbrella

Linked

Items without a src render their name as text, which keeps the component useful before final artwork exists.

API reference

PropTypeDefaultDescription
itemsLogoCloudItem[]—Entries with name, optional image source and optional href.
columns2 | 3 | 4 | 5 | 64Column count at the small breakpoint and above.

Accessibility

  • Images always receive the item name as alt text.
  • Linked logos keep a visible focus ring and an accessible name from the image alt or text label.
  • The grid is a plain list, so assistive technology announces the item count.

Vue and plain HTML

This component also ships for Vue (Reka UI) and plain HTML. Install it with npx veil-ui add logo-cloud --framework vue or switch the framework in components.json.

<script setup lang="ts">
import { cn } from "@/lib/utils";

import type { LogoCloudItem } from "./types";

const columns = {
  2: "grid-cols-2",
  3: "grid-cols-3",
  4: "grid-cols-2 sm:grid-cols-4",
  5: "grid-cols-2 sm:grid-cols-5",
  6: "grid-cols-3 sm:grid-cols-6",
} as const;

const props = withDefaults(
  defineProps<{
    items: LogoCloudItem[];
    columns?: keyof typeof columns;
    class?: string;
  }>(),
  { columns: 4 },
);
</script>

<template>
  <ul
    data-slot="logo-cloud"
    :class="
      cn(
        'grid list-none items-center justify-items-center gap-6',
        columns[props.columns],
        props.class,
      )
    "
  >
    <li
      v-for="item in props.items"
      :key="item.name"
      data-slot="logo-cloud-item"
    >
      <a
        v-if="item.href"
        :href="item.href"
        class="rounded-sm opacity-80 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
      >
        <img
          v-if="item.src"
          :src="item.src"
          :alt="item.name"
          class="h-8 w-auto opacity-60 grayscale transition-opacity hover:opacity-100"
        />
        <span v-else class="text-sm font-semibold text-muted-foreground">
          {{ item.name }}
        </span>
      </a>
      <template v-else>
        <img
          v-if="item.src"
          :src="item.src"
          :alt="item.name"
          class="h-8 w-auto opacity-60 grayscale transition-opacity hover:opacity-100"
        />
        <span v-else class="text-sm font-semibold text-muted-foreground">
          {{ item.name }}
        </span>
      </template>
    </li>
  </ul>
</template>

On this page