![]() |
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 StepConnector API. The Steppers are used to convey numbers in some steps. The StepConnectors are lines that are used to join the Steps. The API provides a lot of functionality and we are going to learn to implement them. Import StepConnector API: import StepConnector from '@mui/material/StepConnector'; // or import { StepConnector } 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 StepConnector in Stepper as follows <Stepper activeStep={activeStep} connector={<StepConnector />}> ... </StepConnector> 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: npm install @mui/material @emotion/react npm install @emotion/styled @mui/lab @mui/icons-material Step 4: Run the project as follows: npm start Example 1: In the following example, we have Stepper with StepConnector. App.js
Output: ![]()
Example 2: In the following example, we have customized the StepConnector. App.js
Output: ![]()
Reference: https://mui.com/material-ui/api/step-connector/ |
Reffered: https://www.geeksforgeeks.org
ReactJS |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 13 |