Snippets Card

Bootstrap 5 Pricing Table with Monthly/Yearly Toggle

A three-tier pricing table with a monthly and yearly billing switch, a highlighted popular plan and a lift on hover.

Bootstrap 5 No jQuery Nov 2020 2.2K views

<section class="wdw-stage">
  <div class="container">
    <div class="text-center mx-auto mb-4" style="max-width:34rem">
      <span class="wdw-eyebrow mb-2">Pricing</span>
      <h2 class="wdw-heading h2 mb-1">Simple, honest pricing</h2>
      <p class="wdw-muted mb-3">Start free for 14 days. Change or cancel any time.</p>
      <div class="pt-switch d-inline-flex align-items-center gap-1 p-1 rounded-pill bg-body border" role="group" aria-label="Billing period">
        <button type="button" class="btn btn-sm rounded-pill px-3 active" data-period="monthly" aria-pressed="true">Monthly</button>
        <button type="button" class="btn btn-sm rounded-pill px-3" data-period="yearly" aria-pressed="false">Yearly <span class="badge pt-badge ms-1">-20%</span></button>
      </div>
    </div>

    <div class="row g-4 align-items-stretch justify-content-center">
      <div class="col-md-6 col-lg-4">
        <div class="wdw-card pt-card h-100">
          <div class="card-body p-4 d-flex flex-column h-100">
            <div class="d-flex align-items-center gap-3 mb-3">
              <span class="wdw-icon pt-ico" aria-hidden="true"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3 4 7v5c0 4.5 3.4 8 8 9 4.6-1 8-4.5 8-9V7z"/></svg></span>
              <h3 class="h6 fw-bold mb-0">Standard</h3>
              
            </div>
            <p class="display-5 wdw-heading mb-0">$<span class="pt-price" data-monthly="5" data-yearly="4">5</span><small class="fs-6 fw-normal pt-per">/mo</small></p>
            <p class="small pt-save mb-1 d-none">Save $12/yr</p>
            <p class="small pt-desc mb-4">For personal projects.</p>
            <ul class="list-unstyled d-grid gap-2 mb-4 small"><li class="d-flex align-items-center gap-2"><svg class="flex-shrink-0 text-primary" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 12 5 5L20 7"/></svg> 1 site</li><li class="d-flex align-items-center gap-2"><svg class="flex-shrink-0 text-primary" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 12 5 5L20 7"/></svg> 1 GB storage</li><li class="d-flex align-items-center gap-2"><svg class="flex-shrink-0 text-primary" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 12 5 5L20 7"/></svg> Community support</li><li class="d-flex align-items-center gap-2"><svg class="flex-shrink-0 text-primary" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 12 5 5L20 7"/></svg> Basic analytics</li></ul>
            <button type="button" class="btn btn-outline-primary rounded-pill mt-auto">Get started</button>
          </div>
        </div>
      </div>
      <div class="col-md-6 col-lg-4">
        <div class="wdw-card pt-card h-100 pt-featured wdw-aurora" data-bs-theme="dark">
          <div class="card-body p-4 d-flex flex-column h-100">
            <div class="d-flex align-items-center gap-3 mb-3">
              <span class="wdw-icon pt-ico" aria-hidden="true"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="m13 2-9 12h7l-1 8 9-12h-7z"/></svg></span>
              <h3 class="h6 fw-bold mb-0">Professional</h3>
              <span class="badge rounded-pill bg-white ms-auto">Most popular</span>
            </div>
            <p class="display-5 wdw-heading mb-0" style="color:#fff">$<span class="pt-price" data-monthly="12" data-yearly="10">12</span><small class="fs-6 fw-normal pt-per">/mo</small></p>
            <p class="small pt-save mb-1 d-none">Save $24/yr</p>
            <p class="small pt-desc mb-4">For growing teams.</p>
            <ul class="list-unstyled d-grid gap-2 mb-4 small"><li class="d-flex align-items-center gap-2"><svg class="flex-shrink-0 text-primary" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 12 5 5L20 7"/></svg> 5 sites</li><li class="d-flex align-items-center gap-2"><svg class="flex-shrink-0 text-primary" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 12 5 5L20 7"/></svg> 10 GB storage</li><li class="d-flex align-items-center gap-2"><svg class="flex-shrink-0 text-primary" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 12 5 5L20 7"/></svg> Priority email support</li><li class="d-flex align-items-center gap-2"><svg class="flex-shrink-0 text-primary" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 12 5 5L20 7"/></svg> Advanced analytics</li><li class="d-flex align-items-center gap-2"><svg class="flex-shrink-0 text-primary" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 12 5 5L20 7"/></svg> Custom domains</li></ul>
            <button type="button" class="btn btn-light rounded-pill mt-auto">Start free trial</button>
          </div>
        </div>
      </div>
      <div class="col-md-6 col-lg-4">
        <div class="wdw-card pt-card h-100">
          <div class="card-body p-4 d-flex flex-column h-100">
            <div class="d-flex align-items-center gap-3 mb-3">
              <span class="wdw-icon pt-ico" aria-hidden="true"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="3" width="16" height="18" rx="2"/><path d="M9 7h2M13 7h2M9 11h2M13 11h2M10 21v-4h4v4"/></svg></span>
              <h3 class="h6 fw-bold mb-0">Enterprise</h3>
              
            </div>
            <p class="display-5 wdw-heading mb-0">$<span class="pt-price" data-monthly="45" data-yearly="36">45</span><small class="fs-6 fw-normal pt-per">/mo</small></p>
            <p class="small pt-save mb-1 d-none">Save $108/yr</p>
            <p class="small pt-desc mb-4">For large organisations.</p>
            <ul class="list-unstyled d-grid gap-2 mb-4 small"><li class="d-flex align-items-center gap-2"><svg class="flex-shrink-0 text-primary" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 12 5 5L20 7"/></svg> Unlimited sites</li><li class="d-flex align-items-center gap-2"><svg class="flex-shrink-0 text-primary" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 12 5 5L20 7"/></svg> 100 GB storage</li><li class="d-flex align-items-center gap-2"><svg class="flex-shrink-0 text-primary" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 12 5 5L20 7"/></svg> 24/7 phone support</li><li class="d-flex align-items-center gap-2"><svg class="flex-shrink-0 text-primary" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 12 5 5L20 7"/></svg> SSO and audit logs</li></ul>
            <button type="button" class="btn btn-outline-primary rounded-pill mt-auto">Contact sales</button>
          </div>
        </div>
      </div>
    </div>
  </div>
</section>

Built on Bootstrap 5.3.8 with plain JavaScript — no jQuery. Supports light and dark mode via data-bs-theme.

Free to use in personal and commercial projects under the MIT license.