All Projects → mathusummut → Confetti.js

mathusummut / Confetti.js

Licence: mit
A simple confetti animation for your website :)

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Confetti.js

Esp32 tft library
Full featured TFT library for ESP32 with demo application
Stars: ✭ 383 (+125.29%)
Mutual labels:  library, demo
Chl
C Hypertext Library - A library for writing web applications in C
Stars: ✭ 251 (+47.65%)
Mutual labels:  library, website
Flutterminimalwebsite
A minimalistic Flutter website template for blogs and portfolios. Demo: https://gallery.codelessly.com/flutterwebsites/minimal/
Stars: ✭ 180 (+5.88%)
Mutual labels:  demo, website
Gl Catmull Clark
A javascript implementation of the Catmull-Clark subdivision surface algorithm
Stars: ✭ 100 (-41.18%)
Mutual labels:  library, demo
Bubbles
⚡️A library for adding messenger style floating bubbles to any android application 📲
Stars: ✭ 66 (-61.18%)
Mutual labels:  library, overlay
Android Dev Sources
All those Android development sources that you need to be and stay awesome!
Stars: ✭ 434 (+155.29%)
Mutual labels:  library, website
Teaset
A UI library for react native, provides 20+ pure JS(ES6) components, focusing on content display and action control.
Stars: ✭ 2,845 (+1573.53%)
Mutual labels:  library, overlay
Responsiveframework
Easily make Flutter apps responsive. Automatically adapt UI to different screen sizes. Responsiveness made simple. Demo: https://gallery.codelessly.com/flutterwebsites/minimal/
Stars: ✭ 476 (+180%)
Mutual labels:  demo, website
Flutterwebsite
The flutter.dev website recreated in Flutter. https://gallery.codelessly.com/flutterwebsites/flutterwebsite
Stars: ✭ 76 (-55.29%)
Mutual labels:  demo, website
Focusoverlay
Library for creating animated overlays on focused elements
Stars: ✭ 167 (-1.76%)
Mutual labels:  library, overlay
Ng Aquila
Angular UI Component library for the Open Insurance Platform
Stars: ✭ 170 (+0%)
Mutual labels:  library
Binarypack
The fastest and most memory efficient binary serialization library for .NET Standard 2.1, powered by dynamic IL generation
Stars: ✭ 169 (-0.59%)
Mutual labels:  library
Mctrl
C library providing set of additional user interface controls for Windows, intended to be complementary to standard Win32API controls from USER32.DLL and COMCTL32.DLL.
Stars: ✭ 169 (-0.59%)
Mutual labels:  library
Dragview
Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube New graphic component.
Stars: ✭ 171 (+0.59%)
Mutual labels:  library
Pluxml
PluXml, Moteur de Blog et CMS à l'XML sans base de données
Stars: ✭ 168 (-1.18%)
Mutual labels:  website
Acl Anthology
Data and software for building the ACL Anthology.
Stars: ✭ 168 (-1.18%)
Mutual labels:  library
Adic
Lightweight dependency injection container for Unity
Stars: ✭ 168 (-1.18%)
Mutual labels:  library
Docker Compose Demo
A short demo on how to use Docker Compose to create a Web Service connected to a load balancer and a Redis Database.
Stars: ✭ 168 (-1.18%)
Mutual labels:  demo
Gooi
LÖVE GUI Library
Stars: ✭ 168 (-1.18%)
Mutual labels:  library
Expanding Collection Android
ExpandingCollection is a material design card peek/pop controller. Android UI Library made by @Ramotion
Stars: ✭ 2,032 (+1095.29%)
Mutual labels:  library

confetti.js

The simplest confetti animation overlay for your website! 🙂 (no libraries required - 3.18 KB total)

Just add the following under <body>:

<script src="https://cdn.jsdelivr.net/gh/mathusummut/confetti.js/confetti.min.js"></script><script>confetti.start()</script>

and you're done!

confetti demo

You can call any of the following available functions:

confetti.start();                  //starts the confetti animation (keeps going until stopped manually)
confetti.start(timeout);           //starts confetti animation with confetti timeout in milliseconds (if timeout is 0, it will keep going until stopped manually)
confetti.start(timeout, amount);   //like confetti.start(timeout), but also specifies the number of confetti particles to throw (50 would be a good example)
confetti.start(timeout, min, max); //like confetti.start(timeout), but also the specifies the number of confetti particles randomly between the specified minimum and maximum amount
confetti.stop();        //stops adding confetti
confetti.toggle();      //starts or stops the confetti animation depending on whether it's already running
confetti.pause();       //freezes the confetti animation
confetti.resume();      //unfreezes the confetti animation
confetti.togglePause(); //toggles whether the confetti animation is paused
confetti.remove();      //stops the confetti animation and remove all confetti immediately
confetti.isPaused();    //returns true or false depending on whether the confetti animation is paused
confetti.isRunning();   //returns true or false depending on whether the animation is running

You can also configure these parameters:

confetti.maxCount = 150;     //set max confetti count
confetti.speed = 2;          //set the particle animation speed
confetti.frameInterval = 20; //the confetti animation frame interval in milliseconds
confetti.alpha = 1.0;        //the alpha opacity of the confetti (between 0 and 1, where 1 is opaque and 0 is invisible)
confetti.gradient = false;   //whether to use gradients for the confetti particles

For a live demo, click here and search something, anything :)

The demo uses this function:

confetti.start(1200, 50, 150); //throws a random number of confetti particles (between 50 and 150) for 1200 milliseconds (1.2 seconds)

Enjoy!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].