LogoCards

apps/www/src/sections/LogoCards.astro · 39 lines · group Dividers

LogoCards — logos as white cards with a name and contacts under them (<Logo image title email phone />). Use for: distributors, resellers, partner offices — where the reader is meant to get in touch, not just recognise a brand. Not for: a plain logo row (<Logos>). Children: <Logo> tags with `title` and at least `email` or `phone`; a <Logo> without contacts renders as a bare logo in the grid. Layout: `columns` 2–4 (default 3).

In the fleet

Not used by any site yet.

Samples 1

sample
MDX of this sample
<LogoCards title="DISTRIBUTORS" columns={3}>
  <Logo image="logo-02.png" title="Almara Agri" email="hello@almara.example" phone="+46 8 123 45 67" />
  <Logo image="logo-03.png" title="Kestrel Supply" email="sales@kestrel.example" phone="+47 22 12 34 56" />
  <Logo image="logo-04.png" title="Vinland Tools" email="post@vinland.example" phone="+45 33 11 22 33" />
</LogoCards>

Props

NameTypeRequiredDefaultDescription
idstringanchor of the section
titlestringa small uppercase line above the grid
descriptionstringa sentence under that line
columns2 | 3 | 43cards per row on desktop
theme'light' | 'muted' | 'dark' | 'brand' | 'brand-dark''muted'background of the section (default "muted")

Source apps/www/src/sections/LogoCards.astro @ gitt.one

---
/**
 * LogoCards — logos as white cards with a name and contacts under them (<Logo
 *   image title email phone />).
 *
 * Use for: distributors, resellers, partner offices — where the reader is
 *   meant to get in touch, not just recognise a brand.
 * Not for: a plain logo row (<Logos>).
 * Children: <Logo> tags with `title` and at least `email` or `phone`; a <Logo>
 *   without contacts renders as a bare logo in the grid.
 * Layout: `columns` 2–4 (default 3).
 */
import Section from './_Section.astro';
import type { Theme } from './_Section.astro';

interface Props {
  /** anchor of the section */
  id?: string;
  /** a small uppercase line above the grid */
  title?: string;
  /** a sentence under that line */
  description?: string;
  /** cards per row on desktop */
  columns?: 2 | 3 | 4;
  /** background of the section (default "muted") */
  theme?: Theme;
}
const { id, title, description, columns = 3, theme = 'muted' } = Astro.props;
const cols = { 2: 'sm:grid-cols-2', 3: 'sm:grid-cols-2 md:grid-cols-3', 4: 'sm:grid-cols-2 md:grid-cols-4' }[columns];
---

<Section id={id} theme={theme}>
  {title && <p class="text-center text-sm font-semibold uppercase tracking-wide text-gray-600 [.bg-stone-800_&]:text-primary-100">{title}</p>}
  {description && <p class="mx-auto mt-2 max-w-2xl text-center text-gray-500">{description}</p>}
  <ul class:list={['mt-6 grid list-none grid-cols-1 gap-5', cols]} data-variant="cards">
    <slot />
  </ul>
</Section>

Source links point to engine-astro@7b686388. Samples are demo content: the components are the real ones, the copy and the pictures are made up.