ProductPromotion
Logo

Angular.JS

made by https://0x3d.site

GitHub - ChellappanRajan/ngx-confetti-explosion: Confetti in Angular
Confetti in Angular. Contribute to ChellappanRajan/ngx-confetti-explosion development by creating an account on GitHub.
Visit Site

GitHub - ChellappanRajan/ngx-confetti-explosion: Confetti in Angular

GitHub - ChellappanRajan/ngx-confetti-explosion: Confetti in Angular

ngx-confetti-explosion

Let's celebrate with confetti! ngx-confetti-explosion is an Angular package that lets you create an amazing confetti explosion on your web page.

This library is based on the amazing svelte-confetti-explosion and react-confetti-explosion package. We have taken the core logic from that package and implemented it in Angular separately, making various optimizations along the way.

Features

  • ๐ŸŽ‡ Simple - Easy to use with minimal configuration required.
  • ๐ŸŽ† Elegant - Utilizes an Angular component for seamless integration.
  • ๐ŸŒˆ Highly Customizable - Provides numerous options for different confetti behaviors.

Installation

# npm
npm install ngx-confetti-explosion

# yarn
yarn add ngx-confetti-explosion

Usage

Basic usage:

<ngx-confetti-explosion></ngx-confetti-explosion>

Customizing behavior with options:

<ngx-confetti-explosion [particleCount]="200" [force]="0.3"></ngx-confetti-explosion>

Inputs (Props)

Prop Name Description Type Default Value Example
particleCount Number of confetti particles to create. number 150 <ngx-confetti-explosion [particleCount]="200"></ngx-confetti-explosion>
particleSize Size of the confetti particles in pixels. number 12 <ngx-confetti-explosion [particleSize]="20"></ngx-confetti-explosion>
duration Duration of the confetti animation in milliseconds. number 3500 <ngx-confetti-explosion [duration]="5000"></ngx-confetti-explosion>
colors Colors to use for the confetti particles. Provide an array of strings representing colors. string[] ['#FFC700', '#FF0000', '#2E3191', '#41BBC7'] <ngx-confetti-explosion [colors]="['var(--yellow)', 'var(--red)', '#2E3191', '#41BBC7']"></ngx-confetti-explosion>
particlesShape Shape of particles to use. Can be 'mix', 'circles', or 'rectangles'. `'mix' 'circles' 'rectangles'`
force Force of the confetti particles. Should be a value between 0 and 1. number 0.5 <ngx-confetti-explosion [force]="0.3"></ngx-confetti-explosion>
stageHeight Height of the confetti animation stage in pixels. Confetti will only fall within this height. number 800 <ngx-confetti-explosion [stageHeight]="500"></ngx-confetti-explosion>
stageWidth Width of the confetti animation stage in pixels. Confetti will only fall within this width. number 1600 <ngx-confetti-explosion [stageWidth]="500"></ngx-confetti-explosion>
style (--x, --y) Style props to shift the confetti particles on the x and y axes by the specified amount. CSS units (e.g., px, em, rem) --x: 10px; --y: 10px; <ngx-confetti-explosion style="--x: 10px; --y: 10px;"></ngx-confetti-explosion>

Events

Event Name Description Payload Example
explosionDone Emitted when the confetti animation is completed and all confetti nodes are destroyed. void (explosionDone)="onExplosionDone($event)"

Examples

Basic Example

Performance

This library generates 2 DOM nodes for each confetti particle. With the default setting of 150 particles, it results in 300 nodes. For higher particle counts, such as 400 or 500, it is advisable to check your target devices' performance

License

ngx-confetti-explosion is distributed under the MIT License.

ยฉ Chellappan

More Resources
to explore the angular.

mail [email protected] to add your project or resources here ๐Ÿ”ฅ.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here ๐Ÿ”.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory