![]() |
Material-UI is a UI library providing predefined robust and customizable components for React for easier web development. The MUI design is based on top of Material Design by Google. In this article, we will discuss the React MUI Step API. The Steppers are used to convey numbers in some steps. The Step is one of the multiple steps from the Stepper which provides the content and other features. The API provides a lot of functionality and we will learn to implement them. Import Step API import Step from '@mui/material/Step'; // or import { Step } from '@mui/material'; Props List: Here is the list of props used with this component. We can access them and modify them according to our needs.
CSS Rules:
Syntax: Create a Step inside Stepper as follows: <Stepper activeStep={activeStep}> <Step> <StepLabel>HTML</StepLabel> </Step> </Stepper> Installing and Creating React app, and adding the MUI dependencies: Step 1: Create a react project using the following command. npx create-react-app gfg_tutorial Step 2: Get into the project directory cd gfg_tutorial Step 3: Install the MUI dependencies as follows:
Step 4: Run the project as follows: npm start Example 1: In the following example, we have multiple Steps in the Stepper. App.js Javascript
Output: ![]()
Example 2: In the following example, we have customized the background using the sx field. App.js Javascript
Output: ![]()
Reference: https://mui.com/material-ui/api/step/ |
Reffered: https://www.geeksforgeeks.org
ReactJS |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 12 |