tsparticles-preset-bigCircles
tsParticles preset for big colored circles on a white background.
Sample
How to use it
CDN / Vanilla JS / jQuery
First of all install tsParticles following the instructions for vanilla javascript in the main project here
Once installed you need one more script to be included in your page (or you can download that from jsDelivr:
<script src="https://cdn.jsdelivr.net/npm/tsparticles-preset-big-circles"></script>
This script MUST be placed after the tsParticles
one.
Once the scripts are loaded you can set up tsParticles
like this:
tsParticles.load("tsparticles", {
preset: "bigCircles",
});
Important ⚠️
You can override all the options defining the properties like in any standard tsParticles
installation.
tsParticles.load("tsparticles", {
particles: {
shape: {
type: "square",
},
},
preset: "bigCircles",
});
Like in the sample above, the circles will be replaced by squares.
React.js / Preact / Inferno
The syntax for React.js
, Preact
and Inferno
is the same.
I'll show a simplified sample you can find in this repository; it uses class component, but you can choose any syntax you prefer.
import Particles from "react-tsparticles";
import { Main } from "tsparticles";
import { loadPreset } from "tsparticles-preset-big-circles";
export class ParticlesContainer extends React.PureComponent<IProps> {
customInit(tsParticles: Main) {
loadPreset(tsParticles);
}
render() {
const options = {
preset: "bigCircles",
};
return <Particles options={options} init={this.customInit} />;
}
}
Vue (2.x and 3.x)
Angular
Svelte