How to Use Particles.js in React Project ? Last Updated : 31 Jan, 2020 Comments Improve Suggest changes 10 Likes Like Report Particles.js is a dependency-free, light-weighted and responsive JavaScript plugin for flexible and reactive particles like design which looks like this. We can add Particles.js in our react project by using react-particles. Adding this to your react project will surely attract more audiences. 1. Installation Process: Run the following command on terminal to install Particles.js For npm: npm install react-particles-js For yarn: yarn add react-particles-js 2. Import the packages: Import the package in your file. To import the package paste the following code: import Particles from 'react-particles-js'; 3. Render: Inside return of render function of your component add the element <particles />. Some important props are: width: Width of Canvas. Height: Height of Canvas. Params: Parameter to be passed. Example: javascript // Complete React Code import React from 'react'; import './App.css'; import Particles from 'react-particles-js'; function App() { return ( <div className="App"> By Ankit Bansal <Particles params={{ particles: { number: { value: 200, density: { enable: true, value_area: 1000, } }, }, }} /> </div> ); } export default App; 4. Start Start the npm by using npm start command and you will get a great attractive background. Note: Add <particles /> element as the last element in your returning div. Create Quiz Comment A ankitbansal1412 Follow 10 Improve A ankitbansal1412 Follow 10 Improve Article Tags : ReactJS Technical Scripter 2019 Explore React FundamentalsReact Introduction6 min readReact Environment Setup3 min readReact JS ReactDOM2 min readReact JSX5 min readReactJS Rendering Elements3 min readReact Lists4 min readReact Forms4 min readReactJS Keys4 min readComponents in ReactReact Components4 min readReactJS Functional Components4 min readReact Class Components3 min readReactJS Pure Components4 min readReactJS Container and Presentational Pattern in Components2 min readReactJS PropTypes5 min readReact Lifecycle7 min readReact HooksReact Hooks8 min readReact useState Hook5 min readReactJS useEffect Hook5 min readRouting in ReactReact Router5 min readReact JS Types of Routers10 min read Advanced React ConceptsLazy Loading in React and How to Implement it ?4 min readReactJS Higher-Order Components5 min readCode Splitting in React4 min readReact ProjectsCreate ToDo App using ReactJS3 min readCreate a Quiz App using ReactJS4 min readCreate a Coin Flipping App using ReactJS3 min readHow to create a Color-Box App using ReactJS?4 min readDice Rolling App using ReactJS4 min readGuess the number with React3 min read Like