riot-particles
v2.9.3
Published
Official tsParticles Riot Component - Easily create highly customizable particle, confetti and fireworks animations and use them as animated backgrounds for your website. Ready to use components available also for Web Components, React, Vue.js (2.x and 3.
Downloads
136
Keywords
Readme
riot-particles
Official tsParticles RiotJS component
Installation
npm install riot-particles
or
yarn add riot-particles
Usage
<riot-particles
id="tsparticles"
options='{{
background: {
color: "#000"
},
fullScreen: {
enable: true
},
particles: {
links: {
enable: true
},
move: {
enable: true
}
}
}}'
particlesInit="{async (main) => {
console.log(main);
// this loads the tsparticles package bundle, it is the easiest method for getting everything ready
// starting from v2 you can add only the features you need reducing the bundle size
await loadFull(main);
}}"
particlesLoaded="{(container) => console.log(container)}"
/>
<script>
import RiotParticles from "riot-particles";
import { loadFull } from "tsparticles";
export default {
components: {
RiotParticles,
},
};
</script>
<!-- or -->
<riot-particles
id="tsparticles"
url="https://foo.bar/particles.json"
particlesInit="{async (main) => {
console.log(main);
// this loads the tsparticles package bundle, it is the easiest method for getting everything ready
// starting from v2 you can add only the features you need reducing the bundle size
await loadFull(main);
}}"
particlesLoaded="{(container) => console.log(container)}"
/>
/>
Demos
The demo website is here
There's also a CodePen collection actively maintained and updated here