A heading and two buttons beside a grid of customer logos.

Last updated

Open block
Show code
---
/**
 * Simple logos 02: A heading and two buttons beside a grid of customer logos.
 *
 * @block cta
 * @order 4
 */
import { Atom, Circle, Hexagon, Mountain, Sprout, Square, Sun, Waves, Wind } from '@lucide/astro'
import Section from '@/components/apogee/Section/Section.astro'
import SectionHeader from '@/components/apogee/SectionHeader/SectionHeader.astro'
import Button from '@/components/apogee/Button/Button.astro'
import { plain } from '@/components/apogee/sections/_shared/spine.ts'
import type { CTAContent } from '@/components/apogee/sections/_shared/cta.ts'

/** @composable */
interface Props extends CTAContent {
  /** Customer names, each beside a placeholder mark. @category content */
  logos?: string[] | null
}

const {
  eyebrow,
  heading = 'Join 4,000+ startups growing with us',
  description = 'Start your 30-day free trial today.',
  primaryAction = { label: 'Get started', href: '#' },
  secondaryAction = { label: 'Learn more', href: '#' },
  logos = ['Lumen', 'Quanta', 'Fieldwork', 'Northpeak', 'Arcwave', 'Kitestring', 'Ovalis', 'Brightline', 'Corner'],
} = Astro.props

// ponytail: placeholder marks cycle through the logo names; swap for real logo images when a site has them.
const logoIcons = [Hexagon, Atom, Sprout, Mountain, Waves, Wind, Circle, Sun, Square]
---

<Section spacing="large">
  <div class="grid items-center gap-12 lg:grid-cols-2 lg:gap-16">
    <div class="flex flex-col gap-8">
      <SectionHeader eyebrow={eyebrow ?? undefined} heading={plain(heading)} description={description ?? undefined} />
      {(primaryAction || secondaryAction) && (
      <div class="flex flex-col-reverse gap-3 sm:flex-row ">
      {secondaryAction && <Button href={secondaryAction.href} size="large" variant="outline" color="neutral">{secondaryAction.label}</Button>}
      {primaryAction && <Button href={primaryAction.href} size="large">{primaryAction.label}</Button>}
    </div>
      )}
    </div>
    {logos && (
    <ul class="list-none p-0 grid grid-cols-2 gap-x-8 gap-y-8 sm:grid-cols-3" aria-label="Customers">
      {logos.map((name, i) => { const Mark = logoIcons[i % logoIcons.length]!; return <li class="flex items-center gap-2 text-lg font-semibold text-neutral-faded"><Mark class="size-6" aria-hidden="true" />{name}</li> })}
    </ul>
    )}
  </div>
</Section>

Add

npx @ava-ui/apogee add cta/simple-logos-02

This copies the block to src/components/apogee/blocks/cta/ with everything it uses: Button, Section, SectionHeader. 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

  • The heading is an h2 by default, so the block slots into a page under its h1; item titles are one level down.