StealThis .dev

Pricing Table

Pricing table with monthly/yearly toggle (20% discount), 3-tier cards, feature comparison list, popular badge, and CTA buttons. Pure CSS + JS.

Open in Lab
css vanilla-js
Targets: JS HTML

Code

Pricing Table

A SaaS pricing table with three plans (Free / Pro / Enterprise), monthly/yearly billing toggle with animated price flip and 20% discount display, feature list comparison, a “Most Popular” badge, and CTA buttons.

Features

  • Monthly ↔ Yearly toggle (pill switch) — prices animate flip on change
  • Three pricing cards: Free, Pro (highlighted), Enterprise
  • Feature list per plan with check ✓ / cross ✗ icons
  • “Most Popular” gradient badge on the Pro card
  • CTA buttons with hover glow effect
  • Custom pricing row for Enterprise (“Contact us”)
  • Responsive stacking on mobile

How it works

  1. Toggle updates a billing variable; updatePrices() swaps data-monthlydata-yearly attributes on price elements with a CSS flip animation
  2. Card highlight uses border: 2px solid var(--accent) + box-shadow on the Pro card
  3. Feature rows use Unicode ✓/✗ with CSS color classes