DEV Community

loading...
Cover image for JSConfetti could be downloaded from CDN 🎉

JSConfetti could be downloaded from CDN 🎉

Vladimir Nikitin
Frontend developer working with React and TypeScript
・1 min read

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

Discussion (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.