DEV Community

Vladimir Nikitin
Vladimir Nikitin

Posted on

🎉 Zero-config JS Confetti library

js-confetti is a lightweight zero-config open-source JavaScript library for confetti without any dependencies

Alt Text

GitHub: https://github.com/loonywizard/js-confetti

Usage

Install library via yarn or npm

yarn add js-confetti
Enter fullscreen mode Exit fullscreen mode

Initialize instance of JSConfetti class and call addConfetti method

import JSConfetti from 'js-confetti'

const jsConfetti = new JSConfetti()

jsConfetti.addConfetti()
Enter fullscreen mode Exit fullscreen mode

Thats it!

Top comments (0)