You need to add particle.js to add particle in hero section. You will get an idea to implement the particles.
Include particle js file :
Add this code in html file :
You can find more attributes about particles here