Goal Reached Confetti
A reward card with a confetti cannon burst, via canvas-confetti.
Requires Bootstrap 5, canvas-confetti. Add the CDN tags below to your page (styles in
<head>, scripts before </body>). The downloaded file already includes them.<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"><script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script><script src="https://cdn.jsdelivr.net/npm/canvas-confetti@1.9.3/dist/confetti.browser.min.js"></script><div class="card border-0 shadow-sm text-center" style="max-width:300px"><div class="card-body">
<h6 class="fw-bold">Goal reached! 🎯</h6>
<p class="small text-secondary mb-2">You hit 100% of your target.</p>
<button class="btn btn-success" id="cbFire">Claim reward</button>
</div></div>document.getElementById('cbFire').onclick=function(){var end=Date.now()+800;(function frame(){confetti({particleCount:5,angle:60,spread:55,origin:{x:0}});confetti({particleCount:5,angle:120,spread:55,origin:{x:1}});if(Date.now()<end)requestAnimationFrame(frame)})();};Free to use.This component uses Bootstrap 5, canvas-confetti (linked above). Copy any file, or download a ready-to-open .html page with the CDN links already included.