Snippets Form

Bootstrap 5 Subscription Plan Card with Upgrade and Cancel

A billing panel with the current trial plan, price, days left, usage meters and feature list, an upgrade banner, and a quiet cancel row. Both actions open a confirmation modal listing what changes.

Bootstrap 5 No jQuery May 2020 2.3K views

<section class="wdw-stage">
  <div class="container" style="max-width:820px">
    <div class="mb-4"><span class="wdw-eyebrow">Billing</span><h2 class="wdw-heading h3 mt-1 mb-0">Subscription</h2></div>
    <div class="wdw-card p-4 p-md-5 py-md-5 mb-3">
      <div class="d-flex flex-wrap justify-content-between align-items-start gap-3 mb-4">
        <div>
          <div class="wdw-muted small mb-1">Your plan</div>
          <div class="d-flex align-items-center gap-2"><h3 class="h4 wdw-heading mb-0">Starter Trial</h3><span class="badge rounded-pill text-bg-warning">Trial</span></div>
        </div>
        <div class="text-md-end"><div class="fs-3 fw-bold text-body-emphasis lh-1">$0 <span class="small fw-normal wdw-muted">/ month</span></div><div class="small wdw-muted mt-1">9 days left in trial</div></div>
      </div>
      <div class="row g-4">
        <div class="col-md-7">
          <div class="d-flex justify-content-between small mb-2"><span class="fw-semibold" id="usageLabel">MAUs used</span><span class="wdw-muted" id="usagePct"></span></div>
          <div class="progress" style="height:10px" role="progressbar" aria-label="Monthly active users used" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" id="usageBar"><div class="progress-bar rounded-pill" id="usageFill"></div></div>
          <div class="d-flex justify-content-between small mt-4 mb-2"><span class="fw-semibold">Projects</span><span class="wdw-muted">2 of 3</span></div>
          <div class="progress" style="height:10px" role="progressbar" aria-label="Projects used" aria-valuenow="67" aria-valuemin="0" aria-valuemax="100"><div class="progress-bar rounded-pill" style="width:67%"></div></div>
          <p class="wdw-muted small mt-3 mb-0">Usage resets on Jun 20, 2026.</p>
        </div>
        <div class="col-md-5"><ul class="list-unstyled small d-grid gap-2 mb-0"><li class="d-flex align-items-center gap-2"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" class="text-primary" style="flex:none" aria-hidden="true"><path d="m5 12 5 5 9-10"/></svg><span>500 monthly active users</span></li><li class="d-flex align-items-center gap-2"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" class="text-primary" style="flex:none" aria-hidden="true"><path d="m5 12 5 5 9-10"/></svg><span>3 projects</span></li><li class="d-flex align-items-center gap-2"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" class="text-primary" style="flex:none" aria-hidden="true"><path d="m5 12 5 5 9-10"/></svg><span>Email support</span></li><li class="d-flex align-items-center gap-2"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" class="text-primary" style="flex:none" aria-hidden="true"><path d="m5 12 5 5 9-10"/></svg><span>Basic analytics</span></li></ul></div>
      </div>
    </div>
    <div class="wdw-aurora rounded-4 p-4 p-md-5 mb-3 d-flex flex-wrap justify-content-between align-items-center gap-3">
      <div class="position-relative"><div class="small fw-bold text-uppercase opacity-75" style="letter-spacing:.08em">Recommended</div><h3 class="h4 fw-bold mb-1 mt-1">Upgrade to Growth</h3><p class="mb-0 opacity-75">5,000 MAUs, priority support and unlimited projects · $49/mo</p></div>
      <button type="button" class="btn btn-light rounded-pill px-4 position-relative" data-bs-toggle="modal" data-bs-target="#upgradeModal">Upgrade plan</button>
    </div>
    <div class="rounded-4 border border-danger-subtle p-3 px-md-4 d-flex flex-wrap justify-content-between align-items-center gap-2">
      <p class="small mb-0"><span class="fw-semibold">End subscription.</span> <span class="wdw-muted">Your data is kept for 30 days, then removed.</span></p>
      <button type="button" class="btn btn-link text-danger fw-semibold text-decoration-none px-0" data-bs-toggle="modal" data-bs-target="#cancelModal">Cancel subscription</button>
    </div>
  </div>
  <div class="modal fade" id="upgradeModal" tabindex="-1" aria-labelledby="upgradeTitle" aria-hidden="true"><div class="modal-dialog modal-dialog-centered"><div class="modal-content wdw-card border-0"><div class="modal-body p-4 p-md-5">
    <span class="wdw-icon mb-3"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 19V5M5 12l7-7 7 7"/></svg></span>
    <h3 class="h5 wdw-heading" id="upgradeTitle">Upgrade to Growth</h3><p class="wdw-muted">$49 per month, billed today. What changes:</p>
    <ul class="list-unstyled small d-grid gap-2 mb-4"><li class="d-flex align-items-center gap-2"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" class="text-primary" style="flex:none" aria-hidden="true"><path d="m5 12 5 5 9-10"/></svg><span>MAU limit rises from 500 to 5,000</span></li><li class="d-flex align-items-center gap-2"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" class="text-primary" style="flex:none" aria-hidden="true"><path d="m5 12 5 5 9-10"/></svg><span>Unlimited projects</span></li><li class="d-flex align-items-center gap-2"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" class="text-primary" style="flex:none" aria-hidden="true"><path d="m5 12 5 5 9-10"/></svg><span>Priority support</span></li></ul>
    <div class="d-flex gap-2 justify-content-end"><button type="button" class="btn btn-outline-secondary rounded-pill" data-bs-dismiss="modal">Not now</button><button type="button" class="btn btn-primary rounded-pill" data-bs-dismiss="modal">Confirm upgrade</button></div></div></div></div></div>
  <div class="modal fade" id="cancelModal" tabindex="-1" aria-labelledby="cancelTitle" aria-hidden="true"><div class="modal-dialog modal-dialog-centered"><div class="modal-content wdw-card border-0"><div class="modal-body p-4 p-md-5">
    <span class="wdw-icon bg-danger-subtle text-danger mb-3"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 9v4M12 17h.01M10.3 3.9 2.4 18a2 2 0 0 0 1.7 3h15.8a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0Z"/></svg></span>
    <h3 class="h5 wdw-heading" id="cancelTitle">Cancel your subscription?</h3><p class="wdw-muted">Your data will be removed after 30 days. This cannot be undone. What changes:</p>
    <ul class="list-unstyled small d-grid gap-2 mb-4"><li>• Your plan ends today</li><li>• Your projects become read-only</li><li>• Customer data is deleted after 30 days</li></ul>
    <div class="d-flex gap-2 justify-content-end"><button type="button" class="btn btn-outline-secondary rounded-pill" data-bs-dismiss="modal">Keep plan</button><button type="button" class="btn btn-danger rounded-pill" data-bs-dismiss="modal">Yes, cancel</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.