Get started with tsparticles-updater-gradient CDN
MIT licensed
The tsparticles-updater-gradient library is a JS add-on for the TSParticles engine, providing customizable gradient backgrounds for particle effects.
Tags:- tsparticles
- particles.js
- particlesjs
- particles
- particle
- canvas
- jsparticles
- xparticles
- particles-js
- particles-bg
- particles-bg-vue
- particles-ts
- particles.ts
- react-particles-js
- react-particles.js
- react-particles
- react
- reactjs
- vue-particles
- ngx-particles
- angular-particles
- particleground
- vue
- vuejs
- preact
- preactjs
- jquery
- angularjs
- angular
- typescript
- javascript
- animation
- web
- html5
- web-design
- webdesign
- css
- html
- css3
- animated
- background
- confetti
- fireworks
- fireworks-js
- confetti-js
- confettijs
- fireworksjs
- canvas-confetti
Stable version
Copied!
How to start using tsparticles-updater-gradient CDN
<!DOCTYPE html>
<html>
<head>
<style>
#tsparticles {
height: 100vh;
width: 100%;
}
</style>
</head>
<body>
<div id="tsparticles"></div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/worksans.min.css"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/tsparticles.min.js"></script>
<script src="https://cdn.cdnhub.io/tsparticles-updater-gradient/2.12.0/tsparticles.updater.gradient.min.js"></script>
<script>
const particlesInit = async () => {
await tsparticles.load('tsparticles', {
fullscreen: {
enable: true,
zindex: -1,
},
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: {
number: {
value: 160,
density: {
enable: true,
value_area: 800,
},
},
color: {
value: '#ffffff',
},
shape: {
type: 'circle',
},
opacity: {
value: 0.5,
random: true,
anim: {
enable: true,
speed: 1,
opacity_min: 0.1,
sync: false,
},
},
size: {
value: 5,
random: true,
anim: {
enable: true,
speed: 4,
size_min: 0.1,
sync: false,
},
},
line_linked: {
enable: false,
distance: 150,
color: '#ffffff',
opacity: 0.4,
width: 1,
},
move: {
enable: true,
speed: 1,
direction: 'none',
random: true,
straight: false,
out_mode: 'out',
bounce: false,
attract: {
enable: false,
rotateX: 600,
rotateY: 1200,
},
},
},
interactivity_mode: 'keep',
gradient: {
enable: true,
type: 'gradient-radial',
color: ['#3b405f', '#4286f4'],
rotation_speed: 0.1,
rotation_direction: 'clockwise',
size: 10,
opacity: 0.5,
animation: {
enable: true,
speed: 1,
sync: false,
},
},
background: {
color: '#000000',
image: '',
position: '50% 50%',
repeat: 'no-repeat',
size: 'cover',
attachment: 'fixed',
},
});
};
document.addEventListener('DOMContentLoaded', (event) => {
particlesInit();
});
</script>
</body>
</html>
Copied!
Copied!