How to use SpeedDial Component in ReactJS ? Last Updated : 23 Jul, 2024 Summarize Comments Improve Suggest changes Share Like Article Like Report SpeedDial is a quick action button for the user from where the user can click over it and easily access the various option provided in the dial. 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 SpeedDial Component.Creating 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 module using the following command:npm install @material-ui/corenpm install @material-ui/iconsnpm install @material-ui/labProject Structure: It will look like the following.Project StructureExample: Now write down the following code in the App.js file. Here, App is our default component where we have written our code. App.js import React from 'react'; import SpeedDial from '@material-ui/lab/SpeedDial'; import SpeedDialAction from '@material-ui/lab/SpeedDialAction'; import ShareIcon from '@material-ui/icons/Share'; import SpeedDialIcon from '@material-ui/lab/SpeedDialIcon'; import EditIcon from '@material-ui/icons/Edit'; import PrintIcon from '@material-ui/icons/Print'; export default function App() { const [open, setOpen] = React.useState(false); return ( <div style={{ display: 'block', padding: 30 }}> <h4>How to use SpeedDial Component in ReactJS?</h4> <SpeedDial ariaLabel="SpeedDial Component Demo" style={{ left: 125, bottom: 125, position: 'absolute', }} icon={<SpeedDialIcon openIcon={<EditIcon />} />} onClose={() => { setOpen(false); }} onOpen={() => { setOpen(true); }} open={open} > {[ { icon: <ShareIcon />, name: 'Share' }, { icon: <PrintIcon />, name: 'Print' }, ].map((action) => ( <SpeedDialAction icon={action.icon} key={action.name} onClick={() => { setOpen(false); }} tooltipTitle={action.name} /> ))} </SpeedDial> </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/, you will see the following output: Reference: https://material-ui.com/components/speed-dial/ Comment More infoAdvertise with us Next Article How to use CircularProgress Component in ReactJS? G gouravhammad Follow Improve Article Tags : ReactJS Material-UI Similar Reads ReactJS Onsen UI SpeedDial Component ReactJS Onsen-UI is a popular front-end library with a set of React components that are designed to developing HTML5 hybrid and mobile web apps in a beautiful and efficient way. SpeedDial Component allows the user to perform an action from the quick action button available. We can use the following 2 min read ReactJS Onsen UI SpeedDialItem Component ReactJS Onsen-UI is a popular front-end library with a set of React components that are designed to developing HTML5 hybrid and mobile web apps in a beautiful and efficient way. SpeedDialItem Component allows the user to define the items which are then passed to the speed dial component. We can use 2 min read How to create a Speed Dial Component in ReactJS ? The Material-UI Lab hosts new and exciting components that arenât fully ready for the core library. A Speed Dial component is like a dialog with multiple floating action buttons. It can be used to make any primary actions like share, copy, print, etc. more accessible and make the user experience bet 3 min read How to create components in ReactJS ? Components in React JS is are the core of building React applications. Components are the building blocks that contains UI elements and logic, making the development process easier and reusable. In this article we will see how we can create components in React JS. Table of Content React Functional C 3 min read How to use CircularProgress Component in ReactJS? Progress indicators inform users about the status of ongoing processes such as loading an app, uploading data, etc. We can use CircularProgress Component in ReactJS to show this circular loading effect. Material UI for React has this component available for us and it is very easy to integrate.Prereq 3 min read How to create Stepper Component Using React JS ? The checkout process on e-commerce websites often involves a series of steps, commonly represented by a stepper component. In this tutorial, we will guide you through creating a customizable stepper component using React, allowing you to easily integrate it into your web applications. Preview of fin 4 min read Like