How to Use Particles.js in React Project ? Last Updated : 31 Jan, 2020 Comments Improve Suggest changes Like Article 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. Comment More infoAdvertise with us Next Article How to Use Particles.js in React Project ? ankitbansal1412 Follow Improve Article Tags : Technical Scripter Web Technologies HTML CSS Node.js Technical Scripter 2019 +2 More Similar Reads How to use Particle.js in JavaScript project ? Particles.js is a lightweight JavaScript library used for creating particles that look like the vertices of a polygon. We can also interact by hovering over the particles and creating more particles by clicking on particles. We can use this library in our portfolios which will attract many users and 2 min read How to use React Icons npm Package in React? The React Icons NPM package allows us to easily include popular icons in our React project. It provides a vast collection of icons from various icon libraries like Font Awesome, Material Design, and others wrapped in React Components. This enables us to seamlessly integrate these icons into our reac 3 min read How to add Chatbot in React JS Project ? In today's digital world, chatbots have become an integral part of many websites and applications. They provide a convenient and efficient way to interact with users, answer their queries, and improve overall user experience. If you're working on a React JS project and want to incorporate a chatbot, 3 min read How to integrate React-PDF in ReactJS ? React-PDF is a package that helps users to display PDF files in their React app. By using the react-pdf package we can add PDF files in our React app as if they were images. To use the latest version of react-pdf package, our project should use React 16.3 or later. We can integrate react-pdf using t 2 min read How to use styles in ReactJS ? React is a popular JavaScript library for building single-page applications (SPAs) with dynamic user interfaces. Styling in React can be done in various ways, each with its advantages. In this article, we will explore different approaches to applying styles in React, including inline styles, CSS fil 4 min read 10 Best ReactJS Practices For a Good React Project React is an Open-Source JavaScript library used to build (UIs)User Interfaces. It is the future of web creation with its extra versatility and ease. Since the release of React in 2013, it has gained so much popularity that the present React community count has increased to millions. The industries c 6 min read How to use Bootstrap in React JS ? Explore the seamless integration of Bootstrap into React JS for enhanced styling and responsive web development. This comprehensive guide provides step-by-step instructions, covering the installation process, utilization of Bootstrap components, and best practices to harness the power of both techno 3 min read How to Use Flux to Manage State in ReactJS? State management in ReactJS is important for building dynamic and responsive applications. Flux, an architecture for managing state, provides a structured approach to handle data flow and state changes efficiently in React applications. In this article, we will explore the Flux to Manage State in Re 5 min read How to Pass JSON Values into React Components ? In React, you can pass JSON values into components using props. Props allow us to send data from a parent component to its child components. When rendering a component, you can pass the JSON values as props. These props can then be accessed within the componentâs function or class, allowing you to d 3 min read How to Set Up a Vite Project? Vite is a modern front-end build tool that offers a fast development experience by using native ES modules in the browser. It provides a lean and efficient setup for building JavaScript applications with a focus on performance and simplicity. PrerequisitesNodejsReactJavaScript Approach We have discu 2 min read Like