How to use Icon Component in React JS? Last Updated : 04 Dec, 2023 Comments Improve Suggest changes Like Article Like Report Every application requires icons for UI purposes, and integrating them with Material UI for React is seamless. Utilize the Icon Component in ReactJS effortlessly by following this straightforward approach. Prerequisites:NodeJS or NPMReact JSMaterial UISteps to create React Application And Installing Module:Step 1: Create a React application using the following command. npx create-react-app foldernameStep 2: After creating your project folder i.e. foldername, move to it using the following command. cd foldernameStep 3: After creating the ReactJS application, Install the material-ui modules using the following command. npm install @material-ui/iconsProject Structure: Project StructureThe updated dependencies in package.json file will look like: "dependencies": { "@material-ui/core": "^4.12.4", "react": "^18.2.0", "react-dom": "^18.2.0", "react-scripts": "5.0.1", "web-vitals": "^2.1.4",}Example: Now write down the following code in the App.js file. JavaScript // App.js import React from "react"; import DeleteIcon from "@material-ui/icons/Delete"; import Home from "@material-ui/icons/Home"; import Person from "@material-ui/icons/Person"; export default function App() { return ( <div style={{ display: "block", padding: 30 }}> <h4>How to use Icon Component in ReactJS?</h4> <pre> Sample Delete Icon: <DeleteIcon /> <br></br> Sample Home Icon: <Home /> <br></br> Sample Person Icon: <Person /> <br></br> </pre> </div> ); } Step to Run Application: Run the application using the following command from the root directory of the project. npm startOutput: Now open your browser and go to http://localhost:3000 Comment More infoAdvertise with us Next Article How to use Icon Component in React JS? gouravhammad Follow Improve Article Tags : JavaScript Web Technologies ReactJS Material-UI React-Questions +1 More Similar Reads How to use List Component in ReactJS? Lists are continuous, vertical indexes of text or images. Material UI for React has this component available for us, and it is very easy to integrate. We can use the List Component in ReactJS using the following approach. Prerequisites:NodeJS or NPMReactJSSteps to Create the React Application And In 2 min read How to use Bootstrap Icons in React ? React is a free library for making websites look and feel cool. With React, your websites can be super interactive and lively. Itâs great for making modern websites where everything happens on one page. The best part is that you can build and reuse different parts of your webpage, making it easy to 2 min read How to use Badge Component in ReactJS? Badge generates a small badge to the top-right of its children component. Material UI for React has this component available for us, and it is very easy to integrate. We can use the Badge Component in ReactJS using the following approach. Prerequisites:NodeJS or NPMReact JSMaterial UISteps to Create 2 min read How to use Avatar Component in ReactJS? Avatars are found throughout material design with uses in everything from tables to dialog menus. Material UI for React has this component available for us, and it is very easy to integrate. We can use the Avatar Component in ReactJS using the following approach. Prerequisites:NodeJS or NPMReactJSSt 2 min read How to use React Icons in Next.js ? Icons make the website beautiful and interactive. Icons are an important part of a website's user interfaces, which are used in expressing objects, actions, and ideas. They are used to communicate the core idea and intent of a product or action and express the object visually. Here, we will learn to 3 min read How to use SvgIcon Component in ReactJS? We can use the SVG Icons in ReactJS using the SvgIcon Component. SvgIcons comes with built-in accessibility. Material UI for React has this component available for us, and it is very easy to integrate. We can use the SvgIcon Component in ReactJS using the following approach. Prerequisites:NPM & 2 min read How to use Tooltip component in ReactJS? Tooltips display informative text when users hover over, focus on, or tap an element. Material UI for React has this component available for us, and it is very easy to integrate. We can use the Tooltip Component in ReactJS using the following approach.Prerequisites:Nodejs and NPMReact JSMaterial UIA 2 min read React Suite Icons Component React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. Icon Component allows the user to add icons to your application. Icons are commonly used in every application for UI purposes. We can use the following approach 3 min read How to use SnackBar Component in ReactJS ? ReactJS provides developers with a wide range of components to create interactive and dynamic web applications. One such component is the SnackBar, which is commonly used to display temporary messages or notifications to users. Creating a SnackBar component allows for the presentation of these messa 2 min read How to use TreeView Component in ReactJS ? Explore the functionality of ReactJS's TreeView component, a powerful tool for seamlessly navigating and displaying hierarchical structures in web applications. This comprehensive guide delves into the integration process, empowering you to represent complex data relationships in an organized and us 2 min read Like