Split CTA With Media
Copy and a button on one side, a pure-CSS gradient media panel on the other, stacked on mobile.
3 个框架初级
A centred heading, sub-copy and a primary/secondary button pair - the default closing call-to-action.
<!--
A CTA sits mid-page, after a hero and sections that already own the <h1>, so
its heading is an <h2>. Promoting it to <h1> would put a second top-level
heading in the document and break the outline.
-->
<section class="mx-auto w-full max-w-3xl px-4 py-14 text-center sm:px-6 sm:py-20">
<h2 class="text-2xl font-bold tracking-tight text-gray-900 sm:text-4xl dark:text-gray-100">
Ready to ship faster?
</h2>
<p class="mx-auto mt-4 max-w-xl text-base leading-relaxed text-gray-600 sm:text-lg dark:text-gray-400">
Start free, invite your team, and go to production in an afternoon.
</p>
<div class="mt-8 flex flex-col items-center justify-center gap-3 sm:flex-row">
<a
href="#"
class="inline-flex w-full items-center justify-center rounded-lg bg-blue-600 px-5 py-2.5 text-sm font-semibold text-white transition-colors hover:bg-blue-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 focus-visible:ring-offset-2 focus-visible:ring-offset-white motion-reduce:transition-none sm:w-auto dark:focus-visible:ring-blue-400 dark:focus-visible:ring-offset-gray-900"
>
Get started
</a>
<a
href="#"
class="inline-flex w-full items-center justify-center rounded-lg border border-gray-300 bg-transparent px-5 py-2.5 text-sm font-semibold text-gray-700 transition-colors hover:bg-gray-100 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 focus-visible:ring-offset-2 focus-visible:ring-offset-white motion-reduce:transition-none sm:w-auto dark:border-gray-700 dark:text-gray-300 dark:hover:bg-gray-800 dark:hover:text-gray-100 dark:focus-visible:ring-blue-400 dark:focus-visible:ring-offset-gray-900"
>
Talk to sales
</a>
</div>
</section>| Prop | 类型 | 默认值 | 说明 |
|---|---|---|---|
title必填 | string | - | 卡片的标题文本。 |
copy | string | - | 显示在标题下方的正文文本。 |
ctaLabel | string | 'Get started' | 行动号召按钮的文案。 |
ctaHref | string | '#' | 行动号召链接的目标地址。 |
secondaryCtaLabel | string | - | Secondary cta label |
secondaryCtaHref | string | '#' | Secondary cta href |
className | string | - | 合并到根元素上的额外类名。 |
The heading is an `<h2>` on purpose: a CTA sits mid-page after the hero owns the `<h1>`, so promoting it would break the outline. The buttons go full width and stack below `sm`, because two 140px buttons side by side on a phone are two bad tap targets instead of one good one.