DEV Community 👩‍💻👨‍💻

Cover image for JSConfetti could be downloaded from CDN 🎉
Vladimir Nikitin
Vladimir Nikitin

Posted on

JSConfetti could be downloaded from CDN 🎉

Hi everyone!

Wanted to share, that my open-source library JSConfetti is now could be downloaded from CDN:

<script src="https://cdn.jsdelivr.net/npm/js-confetti@latest/dist/js-confetti.browser.js"></script>
Enter fullscreen mode Exit fullscreen mode

After that, JSConfetti class could be accessed as global variable, and you can fire confetti by calling method addConfetti() on JSConfetti class instance

const jsConfetti = new JSConfetti()

jsConfetti.addConfetti()
Enter fullscreen mode Exit fullscreen mode

JSConfetti works without any config, but could be configurable, check out documentation on GitHub

Links: GitHub | NPM | Library Website | CodeSandbox Playground

Top comments (2)

Collapse
drsimplegraffiti profile image
Abayomi Ogunnusi

Nice.....

Collapse
dendihandian profile image
Dendi Handian

I was looking for this kind of JS package a year ago for a Hackathon project on DEV.to. Bookmarked.

🌚 Browsing with dark mode makes you a better developer by a factor of exactly 40.

It's a scientific fact.