Replies: 1 comment
-
I've created a sample here: https://codesandbox.io/p/sandbox/hardcore-shaw-q5fqz8?file=%2Fsrc%2FApp.tsx%3A23%2C11 It shows how to add particles to the container, I've done it in the This is the code used by the The first solution is more flexible, since you can add particles as you want, the other takes care of duration, count, delays and every existing emitter option. The |
Beta Was this translation helpful? Give feedback.
-
I want the particle to run when a button is clicked or some react state changes.
tsparticles-confetti
has aconfetti
function, so I can play the confetti animation every time I action the function.I tried to use
tsparticles-confetti
, but the canvas style did not change. So, I am usingreact-particles
, and the canvas style changed, but the animation can not trigging (only init and loaded).So, my answer is 'how can I trigger the animation inside of the
<Particles />
component ?using props ?
Beta Was this translation helpful? Give feedback.
All reactions