How to use AvatarGroup Component in ReactJS? Last Updated : 22 Nov, 2023 Comments Improve Suggest changes Like Article Like Report AvatarGroup Component is used to group multiple Avatars. It renders its children as a stack. Material UI for React has this component available for us, and it is very easy to integrate. We can use the AvatarGroup Component in ReactJS using the following approach. Prerequisites:NodeJS or NPMReactJSMaterial UISteps to Create the 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/corenpm install @material-ui/labProject Structure: Project Structurepackage.json: "dependencies": { "@material-ui/core": "^4.12.4", "@material-ui/lab": "^4.0.0-alpha.61", "react": "^18.2.0", "react-dom": "^18.2.0", "react-scripts": "5.0.1", "web-vitals": "^2.1.4", }Example: This React component showcases the usage of Material-UI's AvatarGroup to display a maximum of four avatars, each with a distinct name and picture. JavaScript import React from "react"; import AvatarGroup from "@material-ui/lab/AvatarGroup"; import Avatar from "@material-ui/core/Avatar"; export default function App() { return ( <div style={{ display: "block" }}> <h4>How to use AvatarGroup Component in ReactJS?</h4> <AvatarGroup max={4}> <Avatar alt="Geeksforgeeks" src="YourPicturePath" /> <Avatar alt="Random Name" src="YourPicturePath" /> <Avatar alt="Unknow" src="YourPicturePath" /> <Avatar alt="Gourav" src="YourPicturePath" /> <Avatar alt="Harrier" src="YourPicturePath" /> </AvatarGroup> </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 AvatarGroup Component in ReactJS? gouravhammad Follow Improve Article Tags : JavaScript Web Technologies ReactJS Material-UI React-Questions +1 More Similar Reads 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 ButtonGroup Component in ReactJS? The ButtonGroup component can be used to group related buttons. Material UI for React has this component available for us and it is very easy to integrate. We can use ButtonGroup Component in ReactJS using the following approach:Creating React Application And Installing Module:Step 1: Create a React 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 CardMedia Component in ReactJS? The CardMedia Component enables users to incorporate media, such as photos or videos, into specific cards. Material UI for React provides a user-friendly integration of this component, making it straightforward to use. Prerequisite:React JSMaterial UISteps to Create React Application And Installing 2 min read 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 Chip Component in React JS? Chips are compact elements that represent an input, attribute, or action. Material UI for React has this component available for us, and it is very easy to integrate. We can use the Chip Component in React JS using the following approach.Prerequisites:Node JS or NPMReact JSMaterial UISteps for Creat 2 min read How to use Portal Component in ReactJS ? The portal component renders its children into a new subtree outside the current DOM hierarchy. Material UI for React has this component available for us, and it is very easy to integrate. We can use the Portal Component in ReactJS using the following approach.Prerequisites:NodeJS or NPMReact JSMate 2 min read How to use DataGrid Component in ReactJS ? A DataGrid Component helps in displaying the information in a grid-like format of rows and columns. Material UI for React has this component available for us, and it is very easy to integrate. We can use the following approach in ReactJS to use DataGrid Component.Creating React Application And Insta 2 min read ReactJS UI Ant Design Avatar Component Ant Design Library has this component pre-built, and it is very easy to integrate as well. Avatar components are used to represent people or objects, and it supports Icons, letters, or images. We can use the following approach in ReactJS to use the Ant Design Avatar Component. Avatar Props: alt: It 2 min read How to use Icon Component in React JS? 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 2 min read Like