How To Add Particles Js To Your Web Project
Posted By : Swati Rahangdale | 27-May-2018
How to add particles.js to your web project?
These are the following steps mention below:
First, you need to host the library. Either you can upload it on your own server or use jsdeliver CDN like me.
Step 1: First Go to the particle.js website. The website has a attactive demo with statistics and options for the library.
Step 2: Download the Particles.js library.
Step 3: after download particles.js library, unzip and archive.You will found the library with multiple files and a demo folder. Now either use particles.js or particles.min.js file. Copy the .js library to your project file.
Step 4: make a html file that will display our particles. Include your particles.js in the head of the HTML file.
Step 5: Create a CSS file to design your HTML page. Here, I am just update the background of the body for the demo.
Step 6: Next is the library configuration part. The best part about the Particles.js library is that the creater has an interactive GUI where you can set your options and create the JSON file for the config. Let’s have a look at the different options. The first one is to select the particle type. You can pick the option from Default, NASA, Bubble, Snow, Nyan Cat. I will be ok with default option. The particle different option lets you set a number of options for number, color, shape, size, etc. All the options are self explanatory.
Step 7: after that, download the JSON file by clicking on Download current config (json). The JSON file contains the particle properties.