Gathering detailed insights and metrics for tsparticles-basic
Gathering detailed insights and metrics for tsparticles-basic
Gathering detailed insights and metrics for tsparticles-basic
Gathering detailed insights and metrics for tsparticles-basic
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-basic
Typescript
Module System
Node Version
NPM Version
96.6
Supply Chain
100
Quality
73.6
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,336 Stars
14,002 Commits
916 Forks
119 Watchers
21 Branches
75 Contributors
Updated on Jul 17, 2025
Latest Version
2.12.0
Package Id
tsparticles-basic@2.12.0
Unpacked Size
606.74 kB
Size
160.93 kB
File Count
20
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
tsParticles basic bundle loads the minimum features to a tsparticles-engine
instance for having dots moving in the canvas.
Included Packages
The CDN/Vanilla version JS has two different files:
loadBasic
function to load the tsParticles basic preset, all dependencies must be
included manuallyIncluding the tsparticles.basic.bundle.min.js
file will work exactly like v1
, you can start using the tsParticles
instance in the same way.
This is the easiest usage, since it's a single file with the some of the v1
features.
All new features will be added as external packages, this bundle is recommended for migrating from v1
easily.
This installation requires more work since all dependencies must be included in the page. Some lines above are all specified in the Included Packages section.
Once the scripts are loaded you can set up tsParticles
like this:
1(async () => { 2 await loadBasic(tsParticles); // not needed if using the bundle script, required for any other installation 3 4 await tsParticles.load({ 5 id: "tsparticles", 6 options: { 7 /* options */ 8 }, 9 }); 10})();
The syntax for React.js
, Preact
and Inferno
is the same.
This sample uses the class component syntax, but you can use hooks as well (if the library supports it).
Class Components
1import React from "react"; 2import Particles from "react-particles"; 3import type { Engine } from "tsparticles-engine"; 4import { loadBasic } from "tsparticles-basic"; 5 6export class ParticlesContainer extends PureComponent<unknown> { 7 // this customizes the component tsParticles installation 8 async customInit(engine: Engine) { 9 // this adds the bundle to tsParticles 10 await loadBasic(engine); 11 } 12 13 render() { 14 const options = { 15 /* custom options */ 16 }; 17 18 return <Particles options={options} init={this.customInit} />; 19 } 20}
Hooks / Functional Components
1import React, { useCallback } from "react"; 2import Particles from "react-particles"; 3import type { Engine } from "tsparticles-engine"; 4import { loadBasic } from "tsparticles-basic"; 5 6export function ParticlesContainer(props: unknown) { 7 // this customizes the component tsParticles installation 8 const customInit = useCallback(async (engine: Engine) => { 9 // this adds the bundle to tsParticles 10 await loadBasic(engine); 11 }); 12 13 const options = { 14 /* custom options */ 15 }; 16 17 return <Particles options={options} init={this.customInit} />; 18}
The syntax for Vue.js 2.x
and 3.x
is the same
1<Particles id="tsparticles" :particlesInit="particlesInit" :options="options" />
1const options = { 2 /* custom options */ 3}; 4 5async function particlesInit(engine: Engine) { 6 await loadBasic(engine); 7}
1<ng-particles [id]="id" [options]="options" [particlesInit]="particlesInit"></ng-particles>
1const options = { 2 /* custom options */ 3}; 4 5async function particlesInit(engine: Engine): void { 6 await loadBasic(engine); 7}
1 2<Particles 3 id="tsparticles" 4 options={options} 5 particlesInit="{particlesInit}" 6/>
1let options = { 2 /* custom options */ 3}; 4 5let particlesInit = async (engine) => { 6 await loadBasic(engine); 7};
No vulnerabilities found.
Reason
security policy file detected
Details
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
0 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 2
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
25 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
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