Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

js-confetti

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-confetti

JS Confetti library with zero dependencies, works without any config, TS typings included, adapts to user screen

  • 0.3.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
35K
increased by3.62%
Maintainers
1
Weekly downloads
 
Created
Source

🎉 JavaScript Confetti library

npm version NPM Downloads npm bundle size

✅ Zero dependencies used

✅ Works without any config

✅ Has TypeScript typings

✅ Confetti speed adapts to user screen width

Demo: https://loonywizard.github.io/js-confetti/

Usage

Install library via yarn or npm

yarn add js-confetti

Initialize instance of JSConfetti class and call addConfetti method

import JSConfetti from 'js-confetti'

const jsConfetti = new JSConfetti()

jsConfetti.addConfetti()

addConfetti args

addConfetti method accepts args object with the following params:

PropTypeDescriptionDefault value
confettiRadiusnumberRadius of confetti shape in pixels8
confettiesNumbernumberNumber of confetties to fire200
confettiColorsstring[]Array of colors for confettiArray of RGB colors
jsConfetti.addConfetti({
  confettiRadius: 8,
  confettiesNumber: 200,
  confettiColors: ['#fcf403', '#62fc03', '#f4fc03', '#03e7fc', '#03fca5', '#a503fc', '#fc03ad', '#fc9003']
})

Keywords

FAQs

Package last updated on 15 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc