Composite

LogoCloud

A row of partner or customer logos, as inline SVG or images, optionally linked.

Basic

The default layout="static" wraps and centres the logos in a row. Each logo takes its name as its text alternative. The optional headline renders as an h2.

Trusted by teams everywhere

Acme
Globex
Initech
Umbrella
Hooli
Vandelay
basic
---
import LogoCloud from '@alfadormx/blocks/composite/LogoCloud.astro';
import type { LogoCloudLogo } from '@alfadormx/blocks/types/logocloud';

const wordmark = (shape: string, label: string, colour: string) =>
  `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 132 32"><g fill="${colour}">${shape}<text x="40" y="22" font-family="system-ui, sans-serif" font-size="18" font-weight="700">${label}</text></g></svg>`;

const marks: Record<string, string> = {
  Acme: wordmark('<circle cx="16" cy="16" r="12"/>', 'Acme', '#e11d48'),
  Globex: wordmark(
    '<path d="M8 4h16a4 4 0 0 1 4 4v16a4 4 0 0 1-4 4H8a4 4 0 0 1-4-4V8a4 4 0 0 1 4-4z"/>',
    'Globex',
    '#2563eb'
  ),
  Initech: wordmark('<polygon points="16,3 29,28 3,28"/>', 'Initech', '#16a34a'),
  Umbrella: wordmark(
    '<path d="M4 18a12 12 0 0 1 24 0z"/><path d="M15 18h2v10h-2z"/>',
    'Umbrella',
    '#dc2626'
  ),
  Hooli: wordmark('<polygon points="16,2 30,16 16,30 2,16"/>', 'Hooli', '#9333ea'),
  Vandelay: wordmark(
    '<path d="M9 10h14a6 6 0 0 1 0 12H9a6 6 0 0 1 0-12z"/>',
    'Vandelay',
    '#ea580c'
  ),
};

const vectorLogo = (name: string): LogoCloudLogo => ({ name, vector: { src: marks[name] } });

const logos = Object.keys(marks).map(vectorLogo);
---

<LogoCloud headline={{ title: 'Trusted by teams everywhere' }} logos={logos} />

With href a logo becomes a link that opens in the same tab and shows a focus ring when reached with the keyboard.

links
---
import LogoCloud from '@alfadormx/blocks/composite/LogoCloud.astro';
import type { LogoCloudLogo } from '@alfadormx/blocks/types/logocloud';

const wordmark = (shape: string, label: string, colour: string) =>
  `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 132 32"><g fill="${colour}">${shape}<text x="40" y="22" font-family="system-ui, sans-serif" font-size="18" font-weight="700">${label}</text></g></svg>`;

const marks: Record<string, string> = {
  Acme: wordmark('<circle cx="16" cy="16" r="12"/>', 'Acme', '#e11d48'),
  Globex: wordmark(
    '<path d="M8 4h16a4 4 0 0 1 4 4v16a4 4 0 0 1-4 4H8a4 4 0 0 1-4-4V8a4 4 0 0 1 4-4z"/>',
    'Globex',
    '#2563eb'
  ),
  Initech: wordmark('<polygon points="16,3 29,28 3,28"/>', 'Initech', '#16a34a'),
  Umbrella: wordmark(
    '<path d="M4 18a12 12 0 0 1 24 0z"/><path d="M15 18h2v10h-2z"/>',
    'Umbrella',
    '#dc2626'
  ),
};

const linkedLogo = (name: string): LogoCloudLogo => ({
  name,
  href: `https://example.com/${name.toLowerCase()}`,
  vector: { src: marks[name] },
});

const logos = Object.keys(marks).map(linkedLogo);
---

<LogoCloud logos={logos} />

Image and vector

Each logo sets exactly one of image (Image props) and vector (Vector props). A vector is recoloured to the text colour, so it follows the theme. To keep its brand colours, set preserveColors.

Northwind
Contoso
Fabrikam
Acme
Globex
Initech
vector
---
import LogoCloud from '@alfadormx/blocks/composite/LogoCloud.astro';
import type { LogoCloudLogo } from '@alfadormx/blocks/types/logocloud';

const wordmark = (shape: string, label: string, colour: string) =>
  `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 132 32"><g fill="${colour}">${shape}<text x="40" y="22" font-family="system-ui, sans-serif" font-size="18" font-weight="700">${label}</text></g></svg>`;

const marks: Record<string, string> = {
  Acme: wordmark('<circle cx="16" cy="16" r="12"/>', 'Acme', '#e11d48'),
  Globex: wordmark(
    '<path d="M8 4h16a4 4 0 0 1 4 4v16a4 4 0 0 1-4 4H8a4 4 0 0 1-4-4V8a4 4 0 0 1 4-4z"/>',
    'Globex',
    '#2563eb'
  ),
  Initech: wordmark('<polygon points="16,3 29,28 3,28"/>', 'Initech', '#16a34a'),
};

const vectorLogo = (name: string): LogoCloudLogo => ({ name, vector: { src: marks[name] } });

const imageLogos: LogoCloudLogo[] = [
  ['Northwind', 'white'],
  ['Contoso', 'yellow'],
  ['Fabrikam', 'rose'],
].map(([name, metal]) => ({
  name,
  image: { src: `~/assets/images/configurator/metal-${metal}.svg`, width: 32, height: 32 },
}));

const logos = [...imageLogos, ...Object.keys(marks).map(vectorLogo)];
---

<LogoCloud logos={logos} />

Grayscale

grayscale desaturates every logo; each regains its colour on hover and keyboard focus. A recoloured vector is already one colour, so the effect is only visible on images and on vectors with preserveColors.

grayscale
---
import LogoCloud from '@alfadormx/blocks/composite/LogoCloud.astro';
import type { LogoCloudLogo } from '@alfadormx/blocks/types/logocloud';

const wordmark = (shape: string, label: string, colour: string) =>
  `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 132 32"><g fill="${colour}">${shape}<text x="40" y="22" font-family="system-ui, sans-serif" font-size="18" font-weight="700">${label}</text></g></svg>`;

const marks: Record<string, string> = {
  Acme: wordmark('<circle cx="16" cy="16" r="12"/>', 'Acme', '#e11d48'),
  Globex: wordmark(
    '<path d="M8 4h16a4 4 0 0 1 4 4v16a4 4 0 0 1-4 4H8a4 4 0 0 1-4-4V8a4 4 0 0 1 4-4z"/>',
    'Globex',
    '#2563eb'
  ),
  Initech: wordmark('<polygon points="16,3 29,28 3,28"/>', 'Initech', '#16a34a'),
};

const colouredLogo = (name: string, href?: string): LogoCloudLogo => ({
  name,
  href,
  vector: { src: marks[name], preserveColors: true },
});

const imageLogos: LogoCloudLogo[] = [
  ['Northwind', 'white'],
  ['Contoso', 'yellow'],
  ['Fabrikam', 'rose'],
].map(([name, metal]) => ({
  name,
  image: { src: `~/assets/images/configurator/metal-${metal}.svg`, width: 32, height: 32 },
}));

const logos = [
  ...imageLogos,
  ...Object.keys(marks).map((name) =>
    colouredLogo(name, `https://example.com/${name.toLowerCase()}`)
  ),
];
---

<LogoCloud logos={logos} grayscale />

Gap and width

gap sets the space between logos; logosClass styles their wrapper, here narrowing it so the logos wrap into more rows.

Acme
Globex
Initech
Umbrella
Hooli
Vandelay
Stark
Wayne
gap
---
import LogoCloud from '@alfadormx/blocks/composite/LogoCloud.astro';
import type { LogoCloudLogo } from '@alfadormx/blocks/types/logocloud';

const wordmark = (shape: string, label: string, colour: string) =>
  `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 132 32"><g fill="${colour}">${shape}<text x="40" y="22" font-family="system-ui, sans-serif" font-size="18" font-weight="700">${label}</text></g></svg>`;

const marks: Record<string, string> = {
  Acme: wordmark('<circle cx="16" cy="16" r="12"/>', 'Acme', '#e11d48'),
  Globex: wordmark(
    '<path d="M8 4h16a4 4 0 0 1 4 4v16a4 4 0 0 1-4 4H8a4 4 0 0 1-4-4V8a4 4 0 0 1 4-4z"/>',
    'Globex',
    '#2563eb'
  ),
  Initech: wordmark('<polygon points="16,3 29,28 3,28"/>', 'Initech', '#16a34a'),
  Umbrella: wordmark(
    '<path d="M4 18a12 12 0 0 1 24 0z"/><path d="M15 18h2v10h-2z"/>',
    'Umbrella',
    '#dc2626'
  ),
  Hooli: wordmark('<polygon points="16,2 30,16 16,30 2,16"/>', 'Hooli', '#9333ea'),
  Vandelay: wordmark(
    '<path d="M9 10h14a6 6 0 0 1 0 12H9a6 6 0 0 1 0-12z"/>',
    'Vandelay',
    '#ea580c'
  ),
  Stark: wordmark('<polygon points="16,2 29,9 29,23 16,30 3,23 3,9"/>', 'Stark', '#ca8a04'),
  Wayne: wordmark('<path d="M2 8h8l6 12 6-12h8L18 28h-4z"/>', 'Wayne', '#0891b2'),
};

const vectorLogo = (name: string): LogoCloudLogo => ({ name, vector: { src: marks[name] } });

const logos = Object.keys(marks).map(vectorLogo);
---

<LogoCloud logos={logos} gap="loose" logosClass="max-w-2xl mx-auto" />

Marquee

layout="marquee" drifts the logos through a looping ContentCarousel at 40 pixels per second; set contentCarousel.autoplay.speed to change it. The strip pauses on hover, on keyboard focus and with its pause button. With reduced motion it stays still, and the arrows move it by hand. A marquee needs at least 6 logos.

marquee
---
import LogoCloud from '@alfadormx/blocks/composite/LogoCloud.astro';
import type { LogoCloudLogo } from '@alfadormx/blocks/types/logocloud';

const wordmark = (shape: string, label: string, colour: string) =>
  `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 132 32"><g fill="${colour}">${shape}<text x="40" y="22" font-family="system-ui, sans-serif" font-size="18" font-weight="700">${label}</text></g></svg>`;

const marks: Record<string, string> = {
  Acme: wordmark('<circle cx="16" cy="16" r="12"/>', 'Acme', '#e11d48'),
  Globex: wordmark(
    '<path d="M8 4h16a4 4 0 0 1 4 4v16a4 4 0 0 1-4 4H8a4 4 0 0 1-4-4V8a4 4 0 0 1 4-4z"/>',
    'Globex',
    '#2563eb'
  ),
  Initech: wordmark('<polygon points="16,3 29,28 3,28"/>', 'Initech', '#16a34a'),
  Umbrella: wordmark(
    '<path d="M4 18a12 12 0 0 1 24 0z"/><path d="M15 18h2v10h-2z"/>',
    'Umbrella',
    '#dc2626'
  ),
  Hooli: wordmark('<polygon points="16,2 30,16 16,30 2,16"/>', 'Hooli', '#9333ea'),
  Vandelay: wordmark(
    '<path d="M9 10h14a6 6 0 0 1 0 12H9a6 6 0 0 1 0-12z"/>',
    'Vandelay',
    '#ea580c'
  ),
  Stark: wordmark('<polygon points="16,2 29,9 29,23 16,30 3,23 3,9"/>', 'Stark', '#ca8a04'),
  Wayne: wordmark('<path d="M2 8h8l6 12 6-12h8L18 28h-4z"/>', 'Wayne', '#0891b2'),
};

const vectorLogo = (name: string): LogoCloudLogo => ({ name, vector: { src: marks[name] } });

const logos = Object.keys(marks).map(vectorLogo);
---

<LogoCloud logos={logos} layout="marquee" />

Marquee in grayscale

Brand-coloured vectors in a grayscale marquee; each regains its colour on hover.

marquee-grayscale
---
import LogoCloud from '@alfadormx/blocks/composite/LogoCloud.astro';
import type { LogoCloudLogo } from '@alfadormx/blocks/types/logocloud';

const wordmark = (shape: string, label: string, colour: string) =>
  `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 132 32"><g fill="${colour}">${shape}<text x="40" y="22" font-family="system-ui, sans-serif" font-size="18" font-weight="700">${label}</text></g></svg>`;

const marks: Record<string, string> = {
  Acme: wordmark('<circle cx="16" cy="16" r="12"/>', 'Acme', '#e11d48'),
  Globex: wordmark(
    '<path d="M8 4h16a4 4 0 0 1 4 4v16a4 4 0 0 1-4 4H8a4 4 0 0 1-4-4V8a4 4 0 0 1 4-4z"/>',
    'Globex',
    '#2563eb'
  ),
  Initech: wordmark('<polygon points="16,3 29,28 3,28"/>', 'Initech', '#16a34a'),
  Umbrella: wordmark(
    '<path d="M4 18a12 12 0 0 1 24 0z"/><path d="M15 18h2v10h-2z"/>',
    'Umbrella',
    '#dc2626'
  ),
  Hooli: wordmark('<polygon points="16,2 30,16 16,30 2,16"/>', 'Hooli', '#9333ea'),
  Vandelay: wordmark(
    '<path d="M9 10h14a6 6 0 0 1 0 12H9a6 6 0 0 1 0-12z"/>',
    'Vandelay',
    '#ea580c'
  ),
  Stark: wordmark('<polygon points="16,2 29,9 29,23 16,30 3,23 3,9"/>', 'Stark', '#ca8a04'),
  Wayne: wordmark('<path d="M2 8h8l6 12 6-12h8L18 28h-4z"/>', 'Wayne', '#0891b2'),
};

const colouredLogo = (name: string, href?: string): LogoCloudLogo => ({
  name,
  href,
  vector: { src: marks[name], preserveColors: true },
});

const logos = Object.keys(marks).map((name) => colouredLogo(name));
---

<LogoCloud logos={logos} layout="marquee" grayscale />

Linked marquee

Linked logos in a slower marquee. Tabbing through them pauses the strip and brings each focused logo into view.

marquee-links
---
import LogoCloud from '@alfadormx/blocks/composite/LogoCloud.astro';
import type { LogoCloudLogo } from '@alfadormx/blocks/types/logocloud';

const wordmark = (shape: string, label: string, colour: string) =>
  `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 132 32"><g fill="${colour}">${shape}<text x="40" y="22" font-family="system-ui, sans-serif" font-size="18" font-weight="700">${label}</text></g></svg>`;

const marks: Record<string, string> = {
  Acme: wordmark('<circle cx="16" cy="16" r="12"/>', 'Acme', '#e11d48'),
  Globex: wordmark(
    '<path d="M8 4h16a4 4 0 0 1 4 4v16a4 4 0 0 1-4 4H8a4 4 0 0 1-4-4V8a4 4 0 0 1 4-4z"/>',
    'Globex',
    '#2563eb'
  ),
  Initech: wordmark('<polygon points="16,3 29,28 3,28"/>', 'Initech', '#16a34a'),
  Umbrella: wordmark(
    '<path d="M4 18a12 12 0 0 1 24 0z"/><path d="M15 18h2v10h-2z"/>',
    'Umbrella',
    '#dc2626'
  ),
  Hooli: wordmark('<polygon points="16,2 30,16 16,30 2,16"/>', 'Hooli', '#9333ea'),
  Vandelay: wordmark(
    '<path d="M9 10h14a6 6 0 0 1 0 12H9a6 6 0 0 1 0-12z"/>',
    'Vandelay',
    '#ea580c'
  ),
  Stark: wordmark('<polygon points="16,2 29,9 29,23 16,30 3,23 3,9"/>', 'Stark', '#ca8a04'),
  Wayne: wordmark('<path d="M2 8h8l6 12 6-12h8L18 28h-4z"/>', 'Wayne', '#0891b2'),
};

const linkedLogo = (name: string): LogoCloudLogo => ({
  name,
  href: `https://example.com/${name.toLowerCase()}`,
  vector: { src: marks[name] },
});

const logos = Object.keys(marks).map(linkedLogo);
---

<LogoCloud
  logos={logos}
  layout="marquee"
  contentCarousel={{ autoplay: { mode: 'continuous', speed: 25 } }}
/>

Without JavaScript the marquee shows the first view of logos and its arrows do nothing. The pause control that WCAG 2.2.2 asks for also exists only while JavaScript runs, so use layout="static" where that matters.

API Reference

PropTypeDefaultDescription
containerContainerProps—Configuration for the outer Container
headlineHeadlineProps—Headline above the logos; not rendered when omitted (default: { htmlTag: 'h2', align: 'center' })
logosLogoCloudLogo[]—The logos, at least one; at least 6 with `layout: 'marquee'`
layout'static' | 'marquee''static'Wrapped and centred, or a continuously drifting ContentCarousel (default: 'static')
grayscalebooleanfalseShows logos in greyscale, each regaining colour on hover and focus; no visible effect on a recoloured Vector (default: false)
gap'none' | 'tight' | 'normal' | 'loose''normal'Space between logos. Static only (default: 'normal')
logosClassstring—Classes on the logo wrapper. Static only
contentCarouselOmit<ContentCarouselProps, 'items'>—Configuration for the ContentCarousel. Marquee only (default: { ariaLabel: 'Logos', loop: true, autoplay: { mode: 'continuous' }, showIndicators: false, controlsPosition: 'outside' })
defaultImageConfigLayerConfig<ImageProps>—Image config merged under every `image` logo, over the internal defaults (default: { alt: name, layout: 'contained', class: 'h-8 w-auto' })
defaultVectorConfigLayerConfig<VectorProps>—Vector config merged under every `vector` logo, over the internal defaults (default: { ariaLabel: name, class: 'h-8 w-auto' })