Three-Tier Pricing
The canonical Starter / Pro / Enterprise grid, with the middle tier promoted.
6 个框架初级
A Basic / Premium pair that stacks to one column on phones.
<!-- Two tiers stack to one column below sm; the highlighted tier uses a 2px
border plus a text badge, never colour alone. -->
<section class="mx-auto w-full max-w-3xl px-4" aria-labelledby="two-tier-heading">
<h2 class="text-center text-2xl font-bold tracking-tight text-gray-900 sm:text-3xl dark:text-gray-100" id="two-tier-heading">
Two plans, no surprises
</h2>
<ul class="mt-8 grid gap-5 sm:grid-cols-2 sm:items-stretch">
<li class="flex">
<article class="relative flex flex-1 flex-col rounded-2xl border border-gray-200 bg-white p-6 dark:border-gray-800 dark:bg-gray-900" aria-labelledby="two-tier-basic">
<h3 class="text-base font-semibold text-gray-900 dark:text-gray-100" id="two-tier-basic">Basic</h3>
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">Everything a solo maker needs to launch.</p>
<p class="mt-4 flex items-baseline gap-1">
<span class="text-3xl font-bold tracking-tight text-gray-900 dark:text-gray-100">$12</span>
<span class="text-sm text-gray-600 dark:text-gray-400">/month</span>
</p>
<ul class="my-5 grid flex-1 gap-2.5">
<li class="flex items-start gap-2 text-sm text-gray-700 dark:text-gray-300"><svg class="mt-0.5 h-4 w-4 flex-none text-blue-600 dark:text-blue-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path d="M16.7 5.3a1 1 0 0 1 0 1.4l-7.5 7.5a1 1 0 0 1-1.4 0L3.3 9.7a1 1 0 1 1 1.4-1.4l3.8 3.8 6.8-6.8a1 1 0 0 1 1.4 0Z" /></svg>1 workspace</li>
<li class="flex items-start gap-2 text-sm text-gray-700 dark:text-gray-300"><svg class="mt-0.5 h-4 w-4 flex-none text-blue-600 dark:text-blue-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path d="M16.7 5.3a1 1 0 0 1 0 1.4l-7.5 7.5a1 1 0 0 1-1.4 0L3.3 9.7a1 1 0 1 1 1.4-1.4l3.8 3.8 6.8-6.8a1 1 0 0 1 1.4 0Z" /></svg>10 GB storage</li>
<li class="flex items-start gap-2 text-sm text-gray-700 dark:text-gray-300"><svg class="mt-0.5 h-4 w-4 flex-none text-blue-600 dark:text-blue-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path d="M16.7 5.3a1 1 0 0 1 0 1.4l-7.5 7.5a1 1 0 0 1-1.4 0L3.3 9.7a1 1 0 1 1 1.4-1.4l3.8 3.8 6.8-6.8a1 1 0 0 1 1.4 0Z" /></svg>Email support</li>
</ul>
<a href="#" class="block rounded-lg border border-gray-300 px-4 py-2.5 text-center text-sm font-semibold text-blue-700 transition-colors hover:bg-gray-100 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 dark:border-gray-700 dark:text-blue-300 dark:hover:bg-gray-800 dark:focus-visible:ring-blue-400 dark:focus-visible:ring-offset-gray-900">Get started<span class="sr-only"> with Basic</span></a>
</article>
</li>
<li class="flex">
<article class="relative flex flex-1 flex-col rounded-2xl border-2 border-blue-600 bg-white p-6 shadow-sm dark:border-blue-500 dark:bg-gray-900" aria-labelledby="two-tier-premium">
<p class="absolute -top-3 left-6 rounded-full bg-blue-600 px-2.5 py-0.5 text-xs font-semibold text-white">Recommended</p>
<h3 class="text-base font-semibold text-gray-900 dark:text-gray-100" id="two-tier-premium">Premium</h3>
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">For growing teams that ship weekly.</p>
<p class="mt-4 flex items-baseline gap-1">
<span class="text-3xl font-bold tracking-tight text-gray-900 dark:text-gray-100">$29</span>
<span class="text-sm text-gray-600 dark:text-gray-400">/month</span>
</p>
<ul class="my-5 grid flex-1 gap-2.5">
<li class="flex items-start gap-2 text-sm text-gray-700 dark:text-gray-300"><svg class="mt-0.5 h-4 w-4 flex-none text-blue-600 dark:text-blue-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path d="M16.7 5.3a1 1 0 0 1 0 1.4l-7.5 7.5a1 1 0 0 1-1.4 0L3.3 9.7a1 1 0 1 1 1.4-1.4l3.8 3.8 6.8-6.8a1 1 0 0 1 1.4 0Z" /></svg>Unlimited workspaces</li>
<li class="flex items-start gap-2 text-sm text-gray-700 dark:text-gray-300"><svg class="mt-0.5 h-4 w-4 flex-none text-blue-600 dark:text-blue-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path d="M16.7 5.3a1 1 0 0 1 0 1.4l-7.5 7.5a1 1 0 0 1-1.4 0L3.3 9.7a1 1 0 1 1 1.4-1.4l3.8 3.8 6.8-6.8a1 1 0 0 1 1.4 0Z" /></svg>250 GB storage</li>
<li class="flex items-start gap-2 text-sm text-gray-700 dark:text-gray-300"><svg class="mt-0.5 h-4 w-4 flex-none text-blue-600 dark:text-blue-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path d="M16.7 5.3a1 1 0 0 1 0 1.4l-7.5 7.5a1 1 0 0 1-1.4 0L3.3 9.7a1 1 0 1 1 1.4-1.4l3.8 3.8 6.8-6.8a1 1 0 0 1 1.4 0Z" /></svg>Priority support</li>
<li class="flex items-start gap-2 text-sm text-gray-700 dark:text-gray-300"><svg class="mt-0.5 h-4 w-4 flex-none text-blue-600 dark:text-blue-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path d="M16.7 5.3a1 1 0 0 1 0 1.4l-7.5 7.5a1 1 0 0 1-1.4 0L3.3 9.7a1 1 0 1 1 1.4-1.4l3.8 3.8 6.8-6.8a1 1 0 0 1 1.4 0Z" /></svg>Audit log</li>
</ul>
<a href="#" class="block rounded-lg bg-blue-600 px-4 py-2.5 text-center 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 dark:focus-visible:ring-blue-400 dark:focus-visible:ring-offset-gray-900">Get started<span class="sr-only"> with Premium</span></a>
</article>
</li>
</ul>
</section>| Prop | 类型 | 默认值 | 说明 |
|---|---|---|---|
tiers | Tier[] | TIERS | 定价方案,按显示顺序排列。 |
ctaLabel | string | 'Get started' | 行动号召按钮的文案。 |
className | string | - | 合并到根元素上的额外类名。 |
Pass your own `tiers`; mark one `highlighted` to give it the 2px border and text badge. The emphasis is a border weight plus a "Recommended" label, never colour alone, so the choice survives greyscale.