Snippets Modal

Bootstrap 5 Success Confirmation Popup

A centred payment confirmation card with an animated success badge, order summary and clear next actions.

Bootstrap 5 No jQuery Nov 2019 7.5K views

<section class="wdw-stage">
  <div class="container text-center" style="max-width: 420px">
    <div class="wdw-card p-4">
      <span class="wdw-icon mx-auto mb-3"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="5" width="20" height="14" rx="2"/><path d="M2 10h20"/></svg></span>
      <h1 class="wdw-heading h5 mb-1">Order #20481</h1>
      <p class="wdw-muted small mb-3">Review the payment, then confirm.</p>
      <button type="button" class="btn btn-primary rounded-pill px-4" id="okTrigger" data-bs-toggle="modal" data-bs-target="#okModal">Open confirmation</button>
    </div>
  </div>

  <div class="modal fade" id="okModal" tabindex="-1" aria-labelledby="okTitle" aria-describedby="okText" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" style="max-width: 400px">
      <div class="modal-content wdw-card border-0 text-center">
        <div class="modal-body px-4 pt-5 pb-4">
          <span class="check mx-auto mb-4" aria-hidden="true">
            <svg width="38" height="38" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round"><path class="tick" d="m5 12.5 4.5 4.5L19 7.5"/></svg>
          </span>
          <h2 class="wdw-heading h4 mb-2" id="okTitle">Confirm payment</h2>
          <p class="wdw-muted mb-4" id="okText">Your card will be charged now and a receipt sent to your inbox.</p>
          <dl class="text-start border rounded-4 mb-4 small overflow-hidden">
            <div class="d-flex justify-content-between px-3 py-2"><dt class="fw-normal wdw-muted">Order</dt><dd class="fw-semibold mb-0">#20481</dd></div>
            <div class="d-flex justify-content-between px-3 py-2 border-top"><dt class="fw-normal wdw-muted">Amount</dt><dd class="fw-semibold mb-0">$49.00</dd></div>
            <div class="d-flex justify-content-between px-3 py-2 border-top"><dt class="fw-normal wdw-muted">Paid with</dt><dd class="fw-semibold mb-0">Visa ending 4242</dd></div>
          </dl>
          <div class="d-flex gap-2">
            <button type="button" class="btn btn-outline-secondary text-body rounded-pill flex-fill" data-bs-dismiss="modal">Cancel</button>
            <button type="button" class="btn btn-primary rounded-pill flex-fill" data-bs-dismiss="modal">Confirm</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.