![banner](https://particles.js.org/images/banner3.png)
jquery-particles
![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)
Official tsParticles jQuery plugin
![Telegram](https://particles.js.org/images/telegram.png)
![](https://img.buymeacoffee.com/button-api/?text=Buy me a beer&emoji=🍺&slug=matteobruni&button_colour=5F7FFF&font_colour=ffffff&font_family=Arial&outline_colour=000000&coffee_colour=FFDD00)
Installation
$ npm install jquery-particles
or
$ yarn add jquery-particles
or from jsDelivr
![jsDelivr](https://data.jsdelivr.com/v1/package/npm/jquery-particles/badge)
<script src="https://cdn.jsdelivr.net/npm/tsparticles-engine"></script>
<script src="https://cdn.jsdelivr.net/npm/tsparticles/tsparticles.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery-particles"></script>
How to use
HTML
<div id="tsparticles"></div>
$(document).ready(async function () {
await loadFull(tsParticles);
$("#tsparticles")
.particles()
.init(
{
background: {
color: {
value: "#0d47a1",
},
},
fpsLimit: 120,
interactivity: {
events: {
onClick: {
enable: true,
mode: "push",
},
onHover: {
enable: true,
mode: "repulse",
},
resize: true,
},
modes: {
push: {
quantity: 4,
},
repulse: {
distance: 200,
duration: 0.4,
},
},
},
particles: {
color: {
value: "#ffffff",
},
links: {
color: "#ffffff",
distance: 150,
enable: true,
opacity: 0.5,
width: 1,
},
collisions: {
enable: true,
},
move: {
direction: "none",
enable: true,
outModes: {
default: "bounce",
},
random: false,
speed: 6,
straight: false,
},
number: {
density: {
enable: true,
area: 800,
},
value: 80,
},
opacity: {
value: 0.5,
},
shape: {
type: "circle",
},
size: {
value: { min: 1, max: 5 },
},
},
detectRetina: true,
},
function (container) {
}
);
$("#tsparticles")
.particles()
.ajax("particles.json", function (container) {
});
});
Demos
The demo website is here
https://particles.js.org
There's also a CodePen collection actively maintained and updated here
https://codepen.io/collection/DPOage