Gathering detailed insights and metrics for tsparticles-engine
Gathering detailed insights and metrics for tsparticles-engine
Gathering detailed insights and metrics for tsparticles-engine
Gathering detailed insights and metrics for tsparticles-engine
tsParticles - Easily create highly customizable JavaScript particles effects, confetti explosions and fireworks animations and use them as animated backgrounds for your website. Ready to use components available for React.js, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Inferno, Solid, Riot and Web Components.
npm install tsparticles-engine
Typescript
Module System
Node Version
NPM Version
93.4
Supply Chain
100
Quality
78.3
Maintenance
100
Vulnerability
88
License
TypeScript (93.2%)
JavaScript (6.8%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
8,202 Stars
14,002 Commits
898 Forks
119 Watchers
20 Branches
75 Contributors
Updated on May 12, 2025
Minified
Minified + Gzipped
Latest Version
2.12.0
Package Id
tsparticles-engine@2.12.0
Unpacked Size
1.58 MB
Size
273.91 kB
File Count
1,053
NPM Version
lerna/7.1.4/node@v18.16.0+arm64 (darwin)
Node Version
18.16.0
Published on
Aug 04, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
No dependencies detected.
A lightweight TypeScript library for creating particles. Dependency free (*), browser ready and compatible with React.js, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Inferno, Riot.js, Solid.js, and Web Components
Documentation and Development references here 📖
This library is available on two of the most popular CDNs and it's easy and ready to use, if you were using particles.js it's even easier.
You'll find the instructions below, with all the links you need, and don't be scared by TypeScript, it's just the source language.
The output files are just JavaScript. 🤩
CDNs and npm
have all the sources you need in Javascript, a bundle browser ready (tsparticles.engine.min.js), and
all
files splitted for import
syntax.
If you are interested there are some simple instructions just below to guide you to migrate from the old particles.js library.
Please use these hosts or your own to load tsParticles on your projects
https://unpkg.com/tsparticles-confetti/ https://unpkg.com/tsparticles-engine/ https://unpkg.com/tsparticles-fireworks/ https://unpkg.com/tsparticles-basic/ https://unpkg.com/tsparticles-slim/ https://unpkg.com/tsparticles/ https://unpkg.com/tsparticles-all/
tsParticles Confetti
tsParticles Engine
tsParticles Fireworks
tsParticles Basic
tsParticles Slim
tsParticles
tsParticles All
1npm install tsparticles-engine
1yarn add tsparticles-engine
1pnpm install tsparticles-engine
1const tsParticles = require("tsparticles-engine"); 2 3// or 4 5import { tsParticles } from "tsparticles-engine";
The imported tsParticles
is the same instance you have when including the script in the page using the <script>
tag.
Load tsParticles and configure the particles:
index.html
1<div id="tsparticles"></div> 2 3<script src="tsparticles.engine.min.js"></script>
app.js
1// @path-json can be an object or an array, the first will be loaded directly, and the object from the array will be randomly selected 2/* tsParticles.load(@params); */ 3 4tsParticles 5 .load({ 6 id: "tsparticles", 7 url: "presets/default.json", 8 }) 9 .then((container) => { 10 console.log("callback - tsparticles config loaded"); 11 }) 12 .catch((error) => { 13 console.error(error); 14 }); 15 16//or 17 18tsParticles.load({ 19 id: "tsparticles", 20 options: { 21 /* options here */ 22 }, 23}); 24 25//or 26 27tsParticles.load({ 28 id: "tsparticles", 29 options: [ 30 { 31 /* options here */ 32 }, 33 { 34 /* other options here */ 35 }, 36 ], 37}); 38//random object 39 40tsParticles.load({ 41 id: "tsparticles", 42 options: [ 43 { 44 /* options here */ 45 }, 46 { 47 /* other options here */ 48 }, 49 ], 50 index: 1, 51}); //the second one 52// Important! If the index is not in range 0...<array.length, the index will be ignored. 53 54// after initialization this can be used. 55 56/* tsParticles.setOnClickHandler(@callback); */ 57 58/* this will be fired from all particles loaded */ 59 60tsParticles.setOnClickHandler((event, particles) => { 61 /* custom on click handler */ 62}); 63 64// now you can control the animations too, it's possible to pause and resume the animations 65// these methods don't change the config so you're safe with all your configurations 66// domItem(0) returns the first tsParticles instance loaded in the dom 67const particles = tsParticles.domItem(0); 68 69// play will start the animations, if the move is not enabled it won't enable it, it just updates the frame 70particles.play(); 71 72// pause will stop the animations 73particles.pause();
ng-particles
Instructions available here
astro-particles
Instructions available here
ember-tsparticles
Instructions available here
inferno-particles
Instructions available here
jquery-particles
Instructions available here
preact-particles
Instructions available here
react-particles
Instructions available here
riot-particles
You can find the instructions here
solid-particles
You can find the instructions here
svelte-particles
Instructions available here
vue2-particles
Instructions available here
vue3-particles
Instruction available here
web-particles
You can find the instructions here
wordpress-particles
The plugin page hosted on WordPress.org can be found here
Actually, an official tsParticles plugin isn't existing, but I have a collaboration with
the Premium Addons for Elementor
plugin collection.
There are some presets ready to be used in this repository, and they also have a bundle file that contains everything needed to run.
This preset loads big colored circles moving upwards on a white background.
You can find the instructions here
This preset loads colored bubbles coming from the bottom of the screen on a white background.
You can find the instructions here
This preset loads white and red confetti launched from the screen center on a transparent background.
You can find the instructions here
This preset loads a faded red to a black background with particles colored like fire and ash sparks.
You can find the instructions here
This preset loads a mouse trail made with small fading particles like little fireflies.
You can find the instructions here
This preset loads a beautiful fireworks effect.
You can find the instructions here
You can find the instructions here
You can find the instructions here
You can find the instructions here
You can find the instructions here
You can find the instructions here
You can find the instructions here
You can find some tsParticles related templates here. The templates are created for Vanilla Javascript, ReactJS, VueJS, Angular, SvelteJS, and other frameworks.
The templates will vary, new ones can be created or older ones updated with the latest features or changed to a better style. Check them out once in a while.
If you created some good design with tsParticles feel free to submit a pull request with your cool template, you'll be credited as the template author!
https://github.com/tsparticles/templates
https://particles.js.org/samples
You can find all video tutorials on the website here: https://particles.js.org/video.html
More videos are coming soon! Check every day if there are some new contents.
particles.json
You can find some config samples here 📖
You can find all options available here 📖
I've created a tsParticles collection on CodePen 😮 or you can check out my profile
Otherwise, there's the demo page link below.
Want to see even more demos? Clone the repository on your computer and follow these instructions
1$ pnpm i 2$ pnpm run build 3$ cd demo/vanilla 4$ pnpm start
Boom! 💥 http://localhost:3000 and you can check out other demos.
If you are brave enough you can switch to the dev
branch for trying the features under development.
tsParticles has a package that makes this library 100% compatible with the particles.js configuration.
Seriously, you just need to change the script from particles.js to the bundled compatibility package, et-voilà, you're ready 🧙!
You can read more here
Want to know 5 reasons to do the switch? Read here
Below you can find all the information you need to install tsParticles and its new syntax.
tsParticles now supports some customizations 🥳.
You can create your own plugins
Read more here...
1flowchart LR 2 3subgraph b [Bundles] 4bb[tsParticles Basic] --> bs[tsParticles Slim] 5bp[Particles.js compatibility bundle] --> bs 6bs --> bf[tsParticles] 7end 8 9e[tsParticles Engine] --> b 10 11iea & iebo & iebu & iec & ieg & iepa & iepu & ierem & ierep & ies --> bs 12ipa & ipc & ipl --> bs 13mb --> bb 14mp --> bs 15pleq --> bs 16sci --> bb 17si & sl & spo & ssq & sst & st --> bs 18uc & uop & uou & usi --> bb 19ul & urot & ust --> bs 20 21iet --> bf 22pla & plem --> bf 23urol & uti & utw & uw --> bf 24 25subgraph i [Interactions] 26 27subgraph ie [Externals] 28iea[Attract] 29iebo[Bounce] 30iebu[Bubble] 31iec[Connect] 32ieg[Grab] 33iepa[Pause] 34iepu[Push] 35ierem[Remove] 36ierep[Repulse] 37ies[Slow] 38iet[Trail] 39end 40 41il[Light] 42 43subgraph ip [Particles] 44ipa[Attract] 45ipc[Collisions] 46ipl[Links] 47ipr[Repulse] 48end 49 50end 51 52i --> ie 53i --> ip 54 55e --> i 56 57subgraph m [Movers] 58mb[Base] 59mp[Parallax] 60end 61 62e --> m 63 64subgraph pa [Paths] 65pac[Curves] 66papn[Perlin Noise] 67pap[Polygon] 68pasn[Simplex Noise] 69pasvg[SVG] 70end 71 72e --> pa 73 74subgraph pl [Plugins] 75pla[Absorbers] 76plcm[Canvas Mask] 77plem[Emitters] 78plh[HSV Color] 79pli[Infection] 80plm[Motion] 81plp[Polygon Mask] 82pls[Sounds] 83 84subgraph plea [Easings] 85pleb[Back] 86pleci[Circ] 87plecu[Cubic] 88plee[Expo] 89pleq[Quad] 90ple4[Quart] 91ple5[Quint] 92ples[Sine] 93end 94 95subgraph plex [Exports] 96plexi[Image] 97plexj[JSON] 98plexv[Video] 99end 100 101end 102 103pl --> plea 104 105e --> pl 106 107subgraph s [Shapes] 108sa[Arrow] 109sb[Bubble] 110sci[Circle] 111scog[Cog] 112sh[Heart] 113si[Image] 114sl[Line] 115smt[Multiline Text] 116spa[Path] 117spo[Polygon] 118srp[Rounded Polygon] 119srr[Rounded Rectangle] 120ssp[Spiral] 121ssq[Square] 122sst[Star] 123st[Text] 124end 125 126e --> s 127 128subgraph u [Updaters] 129uc[Color] 130ud[Destroy] 131ug[Gradient] 132ul[Life] 133uop[Opacity] 134uor[Orbit] 135uou[Out Modes] 136urol[Roll] 137urot[Rotate] 138usi[Size] 139ust[Stroke Color] 140uti[Tilt] 141utw[Twinkle] 142uw[Wobble] 143end 144 145e --> u
Huge thanks to ScribbleMaps for their support on this project.
Huge thanks to JetBrains for the 2020-2022 Open Source Licenses!
JetBrains WebStorm is used to maintain this project.
No vulnerabilities found.
Reason
security policy file detected
Details
Reason
12 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
SAST tool detected but not run on all commits
Details
Reason
Found 0/3 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
Project has not signed or included provenance with any releases.
Details
Reason
project is not fuzzed
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
23 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-05-05
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More