Official tsParticles solid component
npm install @tsparticles/solidor
yarn add @tsparticles/solidExamples:
Remote url
import Particles from "@tsparticles/solid";
function App() {
const [ init, setInit ] = createSignal(false);
createEffect(() => {
if (init()) {
return;
}
initParticlesEngine(async (engine) => {
// this loads the tsparticles package bundle, it's the easiest method for getting everything ready
// starting from v2 you can add only the features you need reducing the bundle size
await loadFull(engine);
}).then(() => {
setInit(true);
})
});
return (
<div class="App">
{init() && <Particles
id="tsparticles"
init={particlesInit}
url="https://foo.bar/particles.json"
/>}
</div>
);
}Options object
import Particles from "@tsparticles/solid";
function App() {
const [ init, setInit ] = createSignal(false);
createEffect(() => {
if (init()) {
return;
}
initParticlesEngine(async (engine) => {
// this loads the tsparticles package bundle, it's the easiest method for getting everything ready
// starting from v2 you can add only the features you need reducing the bundle size
await loadFull(engine);
}).then(() => {
setInit(true);
})
});
return (
<div class="App">
{init() && <Particles
id="tsparticles"
init={particlesInit}
options={{
background: {
color: "#000",
},
fullScreen: {
enable: true,
},
}}
/>}
</div>
);
}Find your parameters configuration here.
You can see the official sample created using CodeSandbox here
The demo website is here
There's also a CodePen collection actively maintained and updated here




