One line over eight logos, each on its own tile.

Last updated

Open block
Show code
---
/**
 * Cards: One line over eight logos, each on its own tile.
 *
 * @block social-proof
 * @order 5
 */
import { Atom, Circle, Hexagon, Mountain, Sprout, Sun, Waves, Wind } from '@lucide/astro'
import Section from '@/components/apogee/Section/Section.astro'
import { plain } from '@/components/apogee/sections/_shared/spine.ts'
import type { SocialProofContent } from '@/components/apogee/sections/_shared/social-proof.ts'

/** @composable */
interface Props extends SocialProofContent {}

const {
  heading = 'Trusted by 4,000+ companies',
  label = 'Customers',
  logos = ['Lumen', 'Quanta', 'Fieldwork', 'Northpeak', 'Arcwave', 'Kitestring', 'Ovalis', 'Brightline'],
} = Astro.props
const logoIcons = [Hexagon, Atom, Sprout, Mountain, Waves, Wind, Circle, Sun]
---

<Section spacing="large">
  <div class="flex flex-col gap-8 lg:gap-10">
    {heading && <p class="text-center font-medium text-neutral-faded">{plain(heading)}</p>}
    {logos && (
      <ul aria-label={label} class="grid grid-cols-2 gap-3 md:grid-cols-4 md:gap-4">
        {logos.map((name, i) => { const Mark = logoIcons[i % logoIcons.length]!; return <li class="flex h-28 items-center justify-center rounded-xl px-4 py-10 md:h-42 md:px-8 md:py-16 bg-neutral-faded"><span class="flex items-center gap-2 text-lg font-semibold md:text-xl text-neutral"><Mark class="size-7 md:size-8" aria-hidden="true" />{name}</span></li> })}
      </ul>
    )}
  </div>
</Section>

Add

npx @ava-ui/apogee add social-proof/cards

This copies the block to src/components/apogee/blocks/social-proof/ with everything it uses: Section. Every piece of copy is a prop, with the sample copy as its default. Pass yours, or null to hide a part; see copy is props.

Accessibility