An eyebrow, heading and two buttons beside three stacked payment cards, on the brand colour.

Last updated

Open block
Show code
---
/**
 * Card mockup 07: An eyebrow, heading and two buttons beside three stacked payment cards, on the brand colour.
 *
 * @block hero
 * @order 35
 */
import { CirclePlay } from '@lucide/astro'
import Section from '@/components/apogee/Section/Section.astro'
import Heading from '@/components/apogee/Heading/Heading.astro'
import Button from '@/components/apogee/Button/Button.astro'
import PaymentCard from '@/components/apogee/PaymentCard/PaymentCard.astro'
import { plain, type HeroContent } from '@/components/apogee/sections/_shared/spine.ts'

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

const {
  eyebrow = 'Super. Simple. Banking.',
  heading = 'Banking that has your back.',
  description = 'A new kind of business account: cards, payments and reports in one place. Start with a 30-day free trial.',
  primaryAction = { label: 'Sign up', href: '#' },
  secondaryAction = { label: 'Demo', href: '#' },
} = Astro.props
---

<Section spacing="large" background="primary">
  <div class="grid items-center gap-12 lg:gap-16 lg:grid-cols-2">
    <div class="flex flex-col gap-8 md:gap-12">
      <div class="flex flex-col gap-4 md:gap-6 items-start">
      {eyebrow && <p class="text-sm font-semibold ">{eyebrow}</p>}
      <Heading as="h1" size="display" class="text-balance">{plain(heading)}</Heading>
      {description && <p class="max-w-2xl text-lg md:text-xl opacity-85">{description}</p>}
    </div>
      {(primaryAction || secondaryAction) && (
        <div class="flex flex-col-reverse gap-3 sm:flex-row ">
          {secondaryAction && <Button href={secondaryAction.href} size="large" variant="outline" color="neutral" class="border-current! bg-transparent! text-inherit! shadow-none!"><CirclePlay slot="start" aria-hidden="true" />{secondaryAction.label}</Button>}
          {primaryAction && <Button href={primaryAction.href} size="large" color="neutral">{primaryAction.label}</Button>}
        </div>
      )}
    </div>
    <div class="h-96 md:h-120"><div class="relative h-full w-full max-w-md">
        <div class="absolute inset-x-0 mx-auto w-56 md:w-72 top-[10%] -rotate-6"><PaymentCard variant="glass" last4="8080" /></div>
        <div class="absolute inset-x-0 mx-auto w-56 md:w-72 top-[30%]"><PaymentCard variant="glass" last4="1234" /></div>
        <div class="absolute inset-x-0 mx-auto w-56 md:w-72 top-[50%] rotate-6"><PaymentCard color="neutral" last4="4242" /></div>
      </div></div>
  </div>
</Section>

Add

npx @ava-ui/apogee add hero/card-mockup-07

This copies the block to src/components/apogee/blocks/hero/ with everything it uses: Button, Heading, PaymentCard, 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

  • The heading is the page’s h1; the items below are one level down.
  • Each payment card is one image, named by its last four digits.