CSS Plan Comparison Card

A pricing card that lists included features with checks and greys out the ones the plan leaves out.

  • pricing
  • features
  • included
  • excluded
  • checklist
  • plan
HTML
<article class="plan-compare">
  <header>
    <h3>Starter</h3>
    <p><strong>$9</strong> / month</p>
  </header>
  <ul>
    <li>5 projects</li>
    <li>Basic analytics</li>
    <li class="is-off"><span class="plan-compare-sr">Not included: </span>Custom domain</li>
    <li class="is-off"><span class="plan-compare-sr">Not included: </span>Priority support</li>
  </ul>
  <a href="#">Choose Starter</a>
</article>
CSS
.plan-compare {
  width: 220px;
  padding: 18px;
  border: 1px solid #f0abfc;
  border-radius: 16px;
  background: #fff;
  color: #4a044e;
  font-family: system-ui, sans-serif;
}

.plan-compare header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 12px;
  border-bottom: 1px dashed #f5d0fe;
}

.plan-compare h3 {
  margin: 0;
  font-size: 16px;
}

.plan-compare header p {
  margin: 0;
  color: #a21caf;
  font-size: 12px;
}

.plan-compare strong {
  font-size: 22px;
}

.plan-compare ul {
  display: grid;
  gap: 8px;
  margin: 14px 0 16px;
  padding: 0;
  font-size: 14px;
  list-style: none;
}

.plan-compare li::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border-radius: 50%;
  background: #fae8ff;
  color: #a21caf;
  font-size: 11px;
  font-weight: 800;
}

.plan-compare li.is-off {
  color: #a3a3a3;
}

.plan-compare li.is-off::before {
  content: "✕";
  background: #f5f5f5;
  color: #a3a3a3;
}

.plan-compare-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.plan-compare a {
  display: block;
  padding: 9px;
  border: 1.5px solid #c026d3;
  border-radius: 10px;
  color: #a21caf;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.plan-compare a:hover {
  background: #c026d3;
  color: #fff;
}

.plan-compare a:focus-visible {
  outline: 2px solid #c026d3;
  outline-offset: 2px;
}

About this CSS Plan Comparison Card

This CSS Plan Comparison Card is 97 lines of pure CSS (1.6 KB) with no JavaScript and no dependencies. It uses transitions, clip paths, CSS Grid and Flexbox. 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:

  • #f0abfc
  • #fff
  • #4a044e
  • #f5d0fe
  • #a21caf
  • #fae8ff
  • #a3a3a3
  • #f5f5f5
  • #c026d3

How to use this plan comparison card

  1. Copy the HTML and paste it where you want the element to appear.
  2. Copy the CSS into your stylesheet, or inside a <style> tag.
  3. Keep the .plan-compare class name, or rename it in both places. Then tweak colors, sizes and timing to match your design.
  4. Using React or Next.js? Change class to className in 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.

Feedback