CSS Pricing Tier Cards
Three side-by-side pricing tiers with the middle plan raised and highlighted, ready for a pricing page.
<div class="price-tiers">
<article class="price-tier">
<h3>Free</h3>
<p><strong>$0</strong>/mo</p>
<a href="#">Start</a>
</article>
<article class="price-tier price-tier-pop">
<h3>Pro</h3>
<p><strong>$12</strong>/mo</p>
<a href="#">Upgrade</a>
</article>
<article class="price-tier">
<h3>Team</h3>
<p><strong>$29</strong>/mo</p>
<a href="#">Contact</a>
</article>
</div>
.price-tiers {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
align-items: center;
gap: 8px;
width: 100%;
max-width: 360px;
font-family: system-ui, sans-serif;
}
.price-tier {
padding: 16px 8px;
border: 1px solid #e2e8f0;
border-radius: 14px;
background: #fff;
color: #0f172a;
text-align: center;
}
.price-tier h3 {
margin: 0;
color: #64748b;
font-size: 13px;
font-weight: 600;
}
.price-tier p {
margin: 4px 0 12px;
color: #64748b;
font-size: 12px;
}
.price-tier strong {
color: inherit;
font-size: 22px;
}
.price-tier a {
display: block;
padding: 7px 2px;
border: 1px solid #cbd5e1;
border-radius: 8px;
color: #0f172a;
font-size: 12px;
font-weight: 600;
text-decoration: none;
}
.price-tier a:focus-visible {
outline: 2px solid #2563eb;
outline-offset: 2px;
}
.price-tier-pop {
padding: 24px 8px;
border-color: #2563eb;
background: #2563eb;
box-shadow: 0 16px 30px -12px rgba(37, 99, 235, 0.55);
color: #fff;
}
.price-tier-pop h3,
.price-tier-pop p {
color: #dbeafe;
}
.price-tier-pop a {
border-color: #fff;
background: #fff;
color: #1d4ed8;
}
.price-tier-pop a:focus-visible {
outline-color: #fff;
}
About this CSS Pricing Tier Cards
This CSS Pricing Tier Cards is 75 lines of pure CSS (1.2 KB) with no JavaScript and no dependencies. It uses box shadows, CSS Grid and keyboard focus styles. It works in current versions of Chrome, Edge, Safari and Firefox. It works in any stack: plain HTML, React, Vue, Svelte, Astro, WordPress or Webflow.
CSS features used
Customize it
The colors in this snippet. Search and replace them to match your brand:
#e2e8f0#fff#0f172a#64748b#cbd5e1#2563eb#dbeafe#1d4ed8
How to use this pricing tier cards
- Copy the HTML and paste it where you want the element to appear.
- Copy the CSS into your stylesheet, or inside a
<style>tag. - Keep the
.price-tiersclass name, or rename it in both places. Then tweak colors, sizes and timing to match your design. - Using React or Next.js? Change
classtoclassNamein the HTML. The CSS works as is, including in Tailwind projects (put it in your global stylesheet).
Building with an AI tool?
“Copy for AI” copies a short prompt for Cursor, Claude Code, Lovable, Bolt or v0. Your AI tool opens the Markdown version of this snippet and reads the HTML, CSS and setup notes there. If your tool can't open links, with the code instead. More ways to use copy CSS with AI.