Skip to content
Viewership Inquire
Astro UI

CTA Card.

An inset card with copy beside the actions and an optional square image.

ConversionSection1 dependency Original, MIT

.md
Style

Using Claude Code? Give it the agent prompt and skip these steps.

  1. Import the foundation once

    foundation.css holds the tokens every component reads.

    Layout.astro
    ---
    // src/layouts/Layout.astro
    import "../styles/foundation.css";
    ---
  2. Copy CtaCard.astro

    Paste into src/components/viewership/cta-card/

  3. Copy its dependencies

    Each in its own folder, next to this one.

  4. Use it

    Page.astro
    ---
    import CtaCard from "../components/viewership/cta-card/CtaCard.astro";
    ---
    
    <CtaCard />

Props 7

PropTypeDefaultDescription
title string · Headline.
accent string · Closing words of the headline.
body string · Supporting line.
primary { label: string; href: string } · Main action.
secondary { label: string; href: string } · Text-style second action.
as "h2" | "h3" "h2" Heading element.
slot: media slot · Optional square image at the start of the card.

Source 1 file

Original, MIT.