Skip to content

mothepro/lit-confetti

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Confetti animation as a web component

npm Published on webcomponents.org

Install

yarn add lit-confetti

How to Use

First, import the module in your page.

<script type="module" src="https://unpkg.com/lit-confetti/dist/esm/index.js"></script>

Then, add the element to the page.

<lit-confetti
  gravity=1
  count=40
></lit-confetti>
Attribute Type Description
gravity number How fast the confetti papers fall
count number Limit for the max amount of confetti papers to create at once
gradient boolean Confetti papers will have a gradient between 2 colors set
colors string[]
#RRGGBB color format
Possible colors to choose from when generating a confetti paper.
By default rainbow colors are used.

TODO