Bootstrap 5 Invoice Template with Print and Pay Buttons
A clean sale invoice with sender, recipient and payment details, an itemised table, discount and VAT totals, plus print and pay actions.
<section class="wdw-stage">
<div class="container" style="max-width: 920px;">
<article class="wdw-card inv overflow-hidden" aria-labelledby="inv-title">
<header class="d-flex flex-wrap align-items-center justify-content-between gap-3 p-4 border-bottom">
<div class="d-flex align-items-center gap-3">
<span class="wdw-icon inv-brand fw-bold" aria-hidden="true">BB</span>
<div>
<span class="wdw-eyebrow">Invoice</span>
<h2 id="inv-title" class="wdw-heading h4 mb-1">#BBB-10010110101938</h2>
<div class="d-flex flex-wrap align-items-center gap-2">
<span class="badge rounded-pill bg-warning-subtle text-warning-emphasis">Awaiting payment</span>
<span class="wdw-muted small">Issued Apr 30, 2026 · Due May 14, 2026</span>
</div>
</div>
</div>
<div class="d-flex gap-2">
<button type="button" class="btn btn-outline-primary rounded-pill px-3" data-inv-print>
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 9V3h12v6"/><rect x="6" y="14" width="12" height="7" rx="1"/><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"/></svg>
Print
</button>
<button type="button" class="btn btn-primary rounded-pill px-4" data-inv-pay>Pay $16,705.92</button>
</div>
</header>
<div class="row g-3 p-4">
<div class="col-sm-6 col-md-3">
<div class="wdw-eyebrow mb-2 text-body-secondary">From</div>
<address class="mb-0 small lh-base">
<strong class="text-body-emphasis">BBBootstrap Inc</strong><br>
42 Awesome Enclave<br>New York City, NY 10394<br>
[email protected]<br>+48 123 456 789
</address>
</div>
<div class="col-sm-6 col-md-3">
<div class="wdw-eyebrow mb-2 text-body-secondary">Billed to</div>
<address class="mb-0 small lh-base">
<strong class="text-body-emphasis">Northwind Retail Ltd</strong><br>
18 Market Street<br>Boston, MA 02110<br>
[email protected]<br>+1 617 555 0142
</address>
</div>
<div class="col-md-6 col-lg-6">
<div class="wdw-eyebrow mb-2 text-body-secondary">Payment details</div>
<dl class="row small mb-0 lh-base">
<dt class="col-4 fw-normal wdw-muted">VAT</dt><dd class="col-8 mb-0">NYC09090390</dd>
<dt class="col-4 fw-normal wdw-muted">Account</dt><dd class="col-8 mb-0">BBBootstrap Inc</dd>
<dt class="col-4 fw-normal wdw-muted">SWIFT</dt><dd class="col-8 mb-0 fw-semibold font-monospace text-nowrap">99 8888 7777 6666 5555</dd>
</dl>
</div>
</div>
<div class="px-3 px-md-4"><div class="table-responsive rounded-3 border">
<table class="table align-middle mb-0 inv-table">
<thead><tr><th scope="col">#</th><th scope="col">Item</th><th scope="col" class="d-none d-md-table-cell">Description</th><th scope="col" class="text-end">Qty</th><th scope="col" class="text-end d-none d-sm-table-cell">Unit cost</th><th scope="col" class="text-end">Total</th></tr></thead>
<tbody>
<tr><td class="wdw-muted">1</td><th scope="row">iPhone 10</th><td class="d-none d-md-table-cell wdw-muted">Apple iPhone 10 with extended warranty</td><td class="text-end">16</td><td class="text-end d-none d-sm-table-cell">$999.00</td><td class="text-end fw-semibold">$15,984.00</td></tr>
<tr><td class="wdw-muted">2</td><th scope="row">Samsung S6</th><td class="d-none d-md-table-cell wdw-muted">Samsung S6 with extended warranty</td><td class="text-end">20</td><td class="text-end d-none d-sm-table-cell">$150.00</td><td class="text-end fw-semibold">$3,000.00</td></tr>
</tbody>
</table>
</div></div>
<div class="row g-4 p-4 align-items-center">
<div class="col-md-6 order-2 order-md-1">
<ol class="inv-steps list-unstyled d-flex mb-3 small" aria-label="Invoice status">
<li class="done"><span class="inv-dot" aria-hidden="true"></span>Issued</li>
<li class="done"><span class="inv-dot" aria-hidden="true"></span>Sent</li>
<li aria-current="step"><span class="inv-dot" aria-hidden="true"></span>Paid</li>
</ol>
<div class="wdw-eyebrow mb-1 text-body-secondary">Notes</div>
<p class="small wdw-muted mb-0">Payment is due within 14 days. Please include the invoice number in your bank transfer reference. Thank you for your business.</p>
</div>
<div class="col-md-6 order-1 order-md-2">
<dl class="inv-totals mb-0">
<div><dt>Subtotal</dt><dd>$18,984.00</dd></div>
<div><dt>Discount (20%)</dt><dd class="text-success">−$3,796.80</dd></div>
<div><dt>VAT (10%)</dt><dd>$1,518.72</dd></div>
</dl>
<div class="inv-grand d-flex align-items-center justify-content-between rounded-4 px-3 py-3 mt-2"><span class="fw-bold text-body-emphasis">Total due</span><span class="inv-amount">$16,705.92</span></div>
</div>
</div>
</article>
</div>
<div class="toast-container position-fixed bottom-0 end-0 p-3">
<div class="toast align-items-center text-bg-dark border-0" role="status" aria-live="polite" aria-atomic="true" id="invToast">
<div class="d-flex"><div class="toast-body">Redirecting to secure checkout…</div><button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button></div>
</div>
</div>
</section>
/* Web Designer Wall library style — shared base for every Bootstrap 5 snippet.
Indigo accent, Plus Jakarta Sans, soft cards, pill buttons. Works in light and dark. */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");
:root,
[data-bs-theme="light"] {
--wdw-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
--bs-body-font-family: var(--wdw-font);
--bs-primary: #4f46e5;
--bs-primary-rgb: 79, 70, 229;
--bs-primary-text-emphasis: #3730a3;
--bs-primary-bg-subtle: #eef2ff;
--bs-primary-border-subtle: #c7d2fe;
--bs-link-color: #4f46e5;
--bs-link-color-rgb: 79, 70, 229;
--bs-link-hover-color: #4338ca;
--bs-link-hover-color-rgb: 67, 56, 202;
--bs-focus-ring-color: rgba(79, 70, 229, 0.25);
--bs-border-radius: 0.75rem;
--bs-border-radius-lg: 1rem;
--bs-border-radius-xl: 1.25rem;
--wdw-radius-card: 1.25rem;
--wdw-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 16px 40px -16px rgba(16, 24, 40, 0.22);
--wdw-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 12px -4px rgba(16, 24, 40, 0.12);
--wdw-stage: #f5f6fb;
}
[data-bs-theme="dark"] {
--bs-primary: #818cf8;
--bs-primary-rgb: 129, 140, 248;
--bs-primary-text-emphasis: #c7d2fe;
--bs-primary-bg-subtle: rgba(129, 140, 248, 0.14);
--bs-primary-border-subtle: rgba(129, 140, 248, 0.35);
--bs-link-color: #a5b4fc;
--bs-link-color-rgb: 165, 180, 252;
--bs-link-hover-color: #c7d2fe;
--bs-link-hover-color-rgb: 199, 210, 254;
--bs-focus-ring-color: rgba(129, 140, 248, 0.35);
--wdw-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -16px rgba(0, 0, 0, 0.7);
--wdw-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px -4px rgba(0, 0, 0, 0.5);
--wdw-stage: #0f1117;
}
body { font-family: var(--wdw-font); -webkit-font-smoothing: antialiased; }
/* Bootstrap compiles its blue into these components; point them at the accent. */
.btn-primary {
--bs-btn-bg: var(--bs-primary); --bs-btn-border-color: var(--bs-primary);
--bs-btn-hover-bg: #4338ca; --bs-btn-hover-border-color: #4338ca;
--bs-btn-active-bg: #3730a3; --bs-btn-active-border-color: #3730a3;
--bs-btn-disabled-bg: var(--bs-primary); --bs-btn-disabled-border-color: var(--bs-primary);
--bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}
[data-bs-theme="dark"] .btn-primary { --bs-btn-color: #0f1117; --bs-btn-hover-bg: #a5b4fc; --bs-btn-hover-border-color: #a5b4fc; --bs-btn-hover-color: #0f1117; --bs-btn-active-color: #0f1117; }
.btn-outline-primary {
--bs-btn-color: var(--bs-primary); --bs-btn-border-color: var(--bs-primary);
--bs-btn-hover-bg: var(--bs-primary); --bs-btn-hover-border-color: var(--bs-primary);
--bs-btn-active-bg: var(--bs-primary); --bs-btn-active-border-color: var(--bs-primary);
--bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}
.btn { --bs-btn-font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.btn-sm { min-height: 36px; }
.form-control, .form-select { min-height: 44px; border-radius: .75rem; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: rgba(var(--bs-primary-rgb), .6); box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.form-check-input:checked { background-color: var(--bs-primary); border-color: var(--bs-primary); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--bs-primary); }
.nav { --bs-nav-link-color: var(--bs-secondary-color); --bs-nav-link-hover-color: var(--bs-emphasis-color); }
.pagination { --bs-pagination-active-bg: var(--bs-primary); --bs-pagination-active-border-color: var(--bs-primary); --bs-pagination-color: var(--bs-body-color); --bs-pagination-focus-box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.progress, .progress-stacked { --bs-progress-bar-bg: var(--bs-primary); }
.list-group { --bs-list-group-active-bg: var(--bs-primary); --bs-list-group-active-border-color: var(--bs-primary); }
.dropdown-menu { --bs-dropdown-link-active-bg: var(--bs-primary); border-radius: .875rem; box-shadow: var(--wdw-shadow-sm); }
.accordion { --bs-accordion-active-bg: var(--bs-primary-bg-subtle); --bs-accordion-active-color: var(--bs-primary-text-emphasis); --bs-accordion-btn-focus-box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.badge { font-weight: 600; }
/* Library building blocks — use these instead of re-inventing them per snippet. */
.wdw-stage { min-height: 100vh; display: flex; align-items: center; background: var(--wdw-stage); padding-block: 3rem; }
.wdw-card { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent); border-radius: var(--wdw-radius-card); box-shadow: var(--wdw-shadow); }
.wdw-card-sm { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent); border-radius: 1rem; box-shadow: var(--wdw-shadow-sm); }
.wdw-aurora { position: relative; color: #fff; background: radial-gradient(60% 55% at 100% 0, #818cf8 0, transparent 70%), radial-gradient(65% 60% at 0 100%, #ec4899 0, transparent 65%), #1e1b4b; }
.wdw-eyebrow { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bs-primary); }
.wdw-heading { font-weight: 800; letter-spacing: -.02em; color: var(--bs-emphasis-color); }
.wdw-muted { color: var(--bs-secondary-color); }
.wdw-icon { width: 2.75rem; height: 2.75rem; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: .875rem; background: var(--bs-primary-bg-subtle); color: var(--bs-primary); }
/* Component */
.inv-table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-secondary-color); background: var(--bs-tertiary-bg); border: 0; padding: .9rem .75rem; white-space: nowrap; }
.inv-table td, .inv-table tbody th { padding: 1rem .75rem; }
.inv-table tbody th { font-weight: 600; color: var(--bs-emphasis-color); }
.inv-totals > div { display: flex; justify-content: space-between; padding: .65rem 0; border-bottom: 1px dashed var(--bs-border-color); }
.inv-totals dt { font-weight: 500; color: var(--bs-secondary-color); }
.inv-totals dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.inv-grand { background: var(--bs-primary-bg-subtle); border: 1px solid var(--bs-primary-border-subtle); }
.inv-amount { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; color: var(--bs-primary-text-emphasis); }
.inv-brand { width: 3rem; height: 3rem; background: #1e1b4b; color: #fff; }
.inv-steps { gap: 1.25rem; }
.inv-steps li { display: flex; align-items: center; gap: .4rem; color: var(--bs-secondary-color); }
.inv-steps li.done, .inv-steps li[aria-current] { color: var(--bs-body-color); font-weight: 600; }
.inv-dot { width: .6rem; height: .6rem; border-radius: 50%; border: 2px solid var(--bs-border-color); }
.inv-steps .done .inv-dot { background: var(--bs-success); border-color: var(--bs-success); }
.inv-steps [aria-current] .inv-dot { border-color: var(--bs-warning); }
.inv-totals > div { padding: .5rem 0; }
.toast-container { z-index: 1090; }
@media print { .btn, .toast-container { display: none !important; } .wdw-stage { background: #fff; } }
(function () {
function initPrint() {
var btn = document.querySelector('[data-inv-print]');
if (!btn) return;
btn.addEventListener('click', function () { window.print(); });
}
function initPay() {
var btn = document.querySelector('[data-inv-pay]');
var toastEl = document.getElementById('invToast');
if (!btn || !toastEl) return;
btn.addEventListener('click', function () {
bootstrap.Toast.getOrCreateInstance(toastEl, { delay: 2600 }).show();
});
}
initPrint();
initPay();
})();
Built on Bootstrap 5.3.8 with plain JavaScript — no jQuery. Supports light and dark mode via data-bs-theme.