--- productId: material-ui title: React Stepper component components: MobileStepper, Step, StepButton, StepConnector, StepContent, StepIcon, StepLabel, Stepper githubLabel: 'scope: stepper' materialDesign: https://m1.material.io/components/steppers.html githubSource: packages/mui-material/src/Stepper --- # Stepper Steppers convey progress through numbered steps. It provides a wizard-like workflow. Steppers display progress through a sequence of logical and numbered steps. They may also be used for navigation. Steppers may display a transient feedback message after a step is saved. - **Types of Steps**: Editable, Non-editable, Mobile, Optional - **Types of Steppers**: Horizontal, Vertical, Linear, Non-linear :::info This component is no longer documented in the [Material Design guidelines](https://m2.material.io/), but MaterialĀ UI will continue to support it. ::: ## Introduction The Stepper component displays progress through a sequence of logical and numbered steps. It supports horizontal and vertical orientation for desktop and mobile viewports. Steppers are implemented using a collection of related components: - Stepper: the container for the steps. - Step: an individual step in the sequence. - Step Label: a label for a Step. - Step Content: optional content for a Step. - Step Button: optional button for a Step. - Step Icon: optional icon for a Step. - Step Connector: optional customized connector between Steps. ## Basics ```jsx import Stepper from '@mui/material/Stepper'; import Step from '@mui/material/Step'; import StepLabel from '@mui/material/StepLabel'; ``` ## Horizontal stepper Horizontal steppers are ideal when the contents of one step depend on an earlier step. Avoid using long step names in horizontal steppers. ### Linear A linear stepper allows the user to complete the steps in sequence. The `Stepper` can be controlled by passing the current step index (zero-based) as the `activeStep` prop. `Stepper` orientation is set using the `orientation` prop. This example also shows the use of an optional step by placing the `optional` prop on the second `Step` component. Note that it's up to you to manage when an optional step is skipped. Once you've determined this for a particular step you must set `completed={false}` to signify that even though the active step index has gone beyond the optional step, it's not actually complete. ```tsx import * as React from 'react'; import Box from '@mui/material/Box'; import Stepper from '@mui/material/Stepper'; import Step from '@mui/material/Step'; import StepLabel from '@mui/material/StepLabel'; import Button from '@mui/material/Button'; import Typography from '@mui/material/Typography'; const steps = ['Select campaign settings', 'Create an ad group', 'Create an ad']; export default function HorizontalLinearStepper() { const [activeStep, setActiveStep] = React.useState(0); const [skipped, setSkipped] = React.useState(new Set()); const isStepOptional = React.useCallback((step: number) => { return step === 1; }, []); const isStepSkipped = (step: number) => { return skipped.has(step); }; const handleNext = () => { let newSkipped = skipped; if (isStepSkipped(activeStep)) { newSkipped = new Set(newSkipped.values()); newSkipped.delete(activeStep); } setActiveStep((prevActiveStep) => prevActiveStep + 1); setSkipped(newSkipped); }; const handleBack = () => { setActiveStep((prevActiveStep) => prevActiveStep - 1); }; const handleSkip = () => { if (!isStepOptional(activeStep)) { // You probably want to guard against something like this, // it should never occur unless someone's actively trying to break something. throw new Error("You can't skip a step that isn't optional."); } setActiveStep((prevActiveStep) => prevActiveStep + 1); setSkipped((prevSkipped) => { const newSkipped = new Set(prevSkipped.values()); newSkipped.add(activeStep); return newSkipped; }); }; const handleReset = () => { setActiveStep(0); }; const previousActiveStepRef = React.useRef(activeStep); const resetButtonRef = React.useRef(null); const nextButtonRef = React.useRef(null); // Manage focus when the active step changes. React.useEffect(() => { const previousActiveStep = previousActiveStepRef.current; previousActiveStepRef.current = activeStep; if (activeStep === steps.length) { // If the user has completed all steps and hits "Finish", focus the "Reset" button. resetButtonRef.current!.focus(); return; } if (activeStep === 0 && previousActiveStep === steps.length) { // If the user has completed all steps and hits "Reset", focus the "Next" button. nextButtonRef.current!.focus(); return; } if (isStepOptional(previousActiveStep) && !isStepOptional(activeStep)) { // If the user hits "Skip" and the next step is not optional, focus the "Next" button. nextButtonRef.current!.focus(); } }, [activeStep, isStepOptional]); return ( {steps.map((label, index) => { const stepProps: { completed?: boolean } = {}; const labelProps: { optional?: React.ReactNode; } = {}; if (isStepOptional(index)) { labelProps.optional = ( Optional ); } if (isStepSkipped(index)) { stepProps.completed = false; } return ( {label} ); })} {activeStep === steps.length ? ( All steps completed - you're finished ) : ( Step {activeStep + 1} {isStepOptional(activeStep) && ( )} )} ); } ``` ### Non-linear Non-linear steppers allow the user to enter a multi-step flow at any point. This example is similar to the regular horizontal stepper, except steps are no longer automatically set to `disabled={true}` based on the `activeStep` prop. The use of the `StepButton` here demonstrates clickable step labels, as well as setting the `completed` flag. However because steps can be accessed in a non-linear fashion, it's up to your own implementation to determine when all steps are completed (or even if they need to be completed). Actionable steps mean that they control the content update of a section. From an accessibility standpoint, this means that each `StepButton` requires an `aria-controls` attribute pointing at the content section element. ```tsx import * as React from 'react'; import Box from '@mui/material/Box'; import Stepper from '@mui/material/Stepper'; import Step from '@mui/material/Step'; import StepButton from '@mui/material/StepButton'; import Button from '@mui/material/Button'; import Typography from '@mui/material/Typography'; const steps = ['Select campaign settings', 'Create an ad group', 'Create an ad']; export default function HorizontalNonLinearStepper() { const [activeStep, setActiveStep] = React.useState(0); const [completed, setCompleted] = React.useState<{ [k: number]: boolean; }>({}); const totalSteps = steps.length; const completedSteps = Object.keys(completed).length; const isLastStep = activeStep === totalSteps - 1; const allStepsCompleted = completedSteps === totalSteps; const handleNext = () => { const newActiveStep = isLastStep && !allStepsCompleted ? // It's the last step, but not all steps have been completed, // find the first step that has not been completed steps.findIndex((_step, i) => !(i in completed)) : activeStep + 1; setActiveStep(newActiveStep); }; const handleBack = () => { setActiveStep((prevActiveStep) => prevActiveStep - 1); }; const handleStep = (step: number) => () => { setActiveStep(step); }; const handleComplete = () => { setCompleted({ ...completed, [activeStep]: true, }); handleNext(); }; const handleReset = () => { setActiveStep(0); setCompleted({}); }; const resetButtonRef = React.useRef(null); const nextButtonRef = React.useRef(null); const previousActiveStepRef = React.useRef(activeStep); const previousCompletedRef = React.useRef(completed); // Manage focus when the completed steps change. React.useEffect(() => { const previousCompleted = previousCompletedRef.current; previousCompletedRef.current = completed; if (allStepsCompleted) { // If the user has completed all steps and hits "Finish", focus the "Reset" button. resetButtonRef.current!.focus(); return; } if ( Object.keys(completed).length === 0 && Object.keys(previousCompleted).length !== 0 ) { // If the user has completed all steps and hits "Reset", focus the "Next" button. nextButtonRef.current!.focus(); } }, [completed, allStepsCompleted]); // Manage focus when the active step changes. React.useEffect(() => { if (activeStep === 0 && previousActiveStepRef.current === 1) { // If the user navigated to first step via "Back" button, focus the "Next" button. nextButtonRef.current!.focus(); } previousActiveStepRef.current = activeStep; }, [activeStep]); return ( {steps.map((label, index) => ( {label} ))}
{allStepsCompleted ? ( All steps completed - you're finished ) : ( Step {activeStep + 1} {activeStep !== steps.length && (completed[activeStep] ? ( Step {activeStep + 1} already completed ) : ( ))} )}
); } ``` ### Alternative label Labels can be placed below the step icon by setting the `alternativeLabel` prop on the `Stepper` component. ```tsx import Box from '@mui/material/Box'; import Stepper from '@mui/material/Stepper'; import Step from '@mui/material/Step'; import StepLabel from '@mui/material/StepLabel'; const steps = [ 'Select master blaster campaign settings', 'Create an ad group', 'Create an ad', ]; export default function HorizontalLinearAlternativeLabelStepper() { return ( {steps.map((label) => ( {label} ))} ); } ``` ### Error step ```tsx import * as React from 'react'; import Box from '@mui/material/Box'; import Stepper from '@mui/material/Stepper'; import Step from '@mui/material/Step'; import StepLabel from '@mui/material/StepLabel'; import Typography from '@mui/material/Typography'; const steps = ['Select campaign settings', 'Create an ad group', 'Create an ad']; export default function HorizontalStepperWithError() { const isStepFailed = (step: number) => { return step === 1; }; return ( {steps.map((label, index) => { const labelProps: { optional?: React.ReactNode; error?: boolean; } = {}; if (isStepFailed(index)) { labelProps.optional = ( Alert message ); labelProps.error = true; } return ( {label} ); })} ); } ``` ### Customized horizontal stepper Here is an example of customizing the component. You can learn more about this in the [overrides documentation page](/material-ui/customization/how-to-customize/). ```tsx import * as React from 'react'; import { styled } from '@mui/material/styles'; import Stack from '@mui/material/Stack'; import Stepper from '@mui/material/Stepper'; import Step from '@mui/material/Step'; import StepLabel from '@mui/material/StepLabel'; import Check from '@mui/icons-material/Check'; import SettingsIcon from '@mui/icons-material/Settings'; import GroupAddIcon from '@mui/icons-material/GroupAdd'; import VideoLabelIcon from '@mui/icons-material/VideoLabel'; import StepConnector, { stepConnectorClasses } from '@mui/material/StepConnector'; import { StepIconProps } from '@mui/material/StepIcon'; const QontoConnector = styled(StepConnector)(({ theme }) => ({ [`&.${stepConnectorClasses.alternativeLabel}`]: { top: 10, left: 'calc(-50% + 16px)', right: 'calc(50% + 16px)', }, [`&.${stepConnectorClasses.active}`]: { [`& .${stepConnectorClasses.line}`]: { borderColor: '#784af4', }, }, [`&.${stepConnectorClasses.completed}`]: { [`& .${stepConnectorClasses.line}`]: { borderColor: '#784af4', }, }, [`& .${stepConnectorClasses.line}`]: { borderColor: '#eaeaf0', borderTopWidth: 3, borderRadius: 1, ...theme.applyStyles('dark', { borderColor: theme.palette.grey[800], }), }, })); const QontoStepIconRoot = styled('div')<{ ownerState: { active?: boolean } }>( ({ theme }) => ({ color: '#eaeaf0', display: 'flex', height: 22, alignItems: 'center', '& .QontoStepIcon-completedIcon': { color: '#784af4', zIndex: 1, fontSize: 18, }, '& .QontoStepIcon-circle': { width: 8, height: 8, borderRadius: '50%', backgroundColor: 'currentColor', }, ...theme.applyStyles('dark', { color: theme.palette.grey[700], }), variants: [ { props: ({ ownerState }) => ownerState.active, style: { color: '#784af4', }, }, ], }), ); function QontoStepIcon(props: StepIconProps) { const { active, completed, className } = props; return ( {completed ? ( ) : (
)} ); } const ColorlibConnector = styled(StepConnector)(({ theme }) => ({ [`&.${stepConnectorClasses.alternativeLabel}`]: { top: 22, }, [`&.${stepConnectorClasses.active}`]: { [`& .${stepConnectorClasses.line}`]: { backgroundImage: 'linear-gradient( 95deg,rgb(242,113,33) 0%,rgb(233,64,87) 50%,rgb(138,35,135) 100%)', }, }, [`&.${stepConnectorClasses.completed}`]: { [`& .${stepConnectorClasses.line}`]: { backgroundImage: 'linear-gradient( 95deg,rgb(242,113,33) 0%,rgb(233,64,87) 50%,rgb(138,35,135) 100%)', }, }, [`& .${stepConnectorClasses.line}`]: { height: 3, border: 0, backgroundColor: '#eaeaf0', borderRadius: 1, ...theme.applyStyles('dark', { backgroundColor: theme.palette.grey[800], }), }, })); const ColorlibStepIconRoot = styled('div')<{ ownerState: { completed?: boolean; active?: boolean }; }>(({ theme }) => ({ backgroundColor: '#ccc', zIndex: 1, color: '#fff', width: 50, height: 50, display: 'flex', borderRadius: '50%', justifyContent: 'center', alignItems: 'center', ...theme.applyStyles('dark', { backgroundColor: theme.palette.grey[700], }), variants: [ { props: ({ ownerState }) => ownerState.active, style: { backgroundImage: 'linear-gradient( 136deg, rgb(242,113,33) 0%, rgb(233,64,87) 50%, rgb(138,35,135) 100%)', boxShadow: '0 4px 10px 0 rgba(0,0,0,.25)', }, }, { props: ({ ownerState }) => ownerState.completed, style: { backgroundImage: 'linear-gradient( 136deg, rgb(242,113,33) 0%, rgb(233,64,87) 50%, rgb(138,35,135) 100%)', }, }, ], })); function ColorlibStepIcon(props: StepIconProps) { const { active, completed, className } = props; const icons: { [index: string]: React.ReactElement } = { 1: , 2: , 3: , }; return ( {icons[String(props.icon)]} ); } const steps = ['Select campaign settings', 'Create an ad group', 'Create an ad']; export default function CustomizedSteppers() { return ( }> {steps.map((label) => ( {label} ))} }> {steps.map((label) => ( {label} ))} ); } ``` ## Vertical stepper Vertical steppers are designed for narrow screen sizes. They are ideal for mobile. All the features of the horizontal stepper can be implemented. ```tsx import * as React from 'react'; import Box from '@mui/material/Box'; import Stepper from '@mui/material/Stepper'; import Step from '@mui/material/Step'; import StepLabel from '@mui/material/StepLabel'; import StepContent from '@mui/material/StepContent'; import Button from '@mui/material/Button'; import Paper from '@mui/material/Paper'; import Typography from '@mui/material/Typography'; const steps = [ { label: 'Select campaign settings', description: `For each ad campaign that you create, you can control how much you're willing to spend on clicks and conversions, which networks and geographical locations you want your ads to show on, and more.`, }, { label: 'Create an ad group', description: 'An ad group contains one or more ads which target a shared set of keywords.', }, { label: 'Create an ad', description: `Try out different ad text to see what brings in the most customers, and learn how to enhance your ads using features like ad extensions. If you run into any problems with your ads, find out how to tell if they're running and how to resolve approval issues.`, }, ]; export default function VerticalLinearStepper() { const [activeStep, setActiveStep] = React.useState(0); const handleNext = () => { setActiveStep((prevActiveStep) => prevActiveStep + 1); }; const handleBack = () => { setActiveStep((prevActiveStep) => prevActiveStep - 1); }; const handleReset = () => { setActiveStep(0); }; const previousActiveStepRef = React.useRef(activeStep); const continueButtonRef = React.useRef(null); const backButtonRef = React.useRef(null); const resetButtonRef = React.useRef(null); // Manage focus when the active step changes. React.useEffect(() => { const previousActiveStep = previousActiveStepRef.current; previousActiveStepRef.current = activeStep; // If the user is going forward. if (previousActiveStep < activeStep) { if (activeStep === steps.length) { // If the user has completed all steps and hits "Finish", focus the "Reset" button. resetButtonRef.current!.focus(); } else { // Focus the "Continue" button otherwise. continueButtonRef.current!.focus(); } return; } // Otherwise, the user is going back. if (activeStep === 0) { // If the user hit "Back" on the second step, or hit "Reset", focus the "Continue" button. continueButtonRef.current!.focus(); return; } // Focus the "Back" button otherwise. backButtonRef.current!.focus(); }, [activeStep]); return ( {steps.map((step, index) => ( Last step ) : null } > {step.label} {step.description} {index !== 0 && ( )} ))} {activeStep === steps.length && ( All steps completed - you're finished )} ); } ``` ### Alternative label Use `alternativeLabel` prop on the vertical `Stepper` component to reverse the placement of the label and content. ```tsx import * as React from 'react'; import Box from '@mui/material/Box'; import Stepper from '@mui/material/Stepper'; import Step from '@mui/material/Step'; import StepLabel from '@mui/material/StepLabel'; import StepContent from '@mui/material/StepContent'; import Button from '@mui/material/Button'; import Paper from '@mui/material/Paper'; import Typography from '@mui/material/Typography'; const steps = [ { label: 'Select campaign settings', description: `For each ad campaign that you create, you can control how much you're willing to spend on clicks and conversions, which networks and geographical locations you want your ads to show on, and more.`, }, { label: 'Create an ad group', description: 'An ad group contains one or more ads which target a shared set of keywords.', }, { label: 'Create an ad', description: `Try out different ad text to see what brings in the most customers, and learn how to enhance your ads using features like ad extensions. If you run into any problems with your ads, find out how to tell if they're running and how to resolve approval issues.`, }, ]; export default function VerticalLinearAlternativeLabelStepper() { const [activeStep, setActiveStep] = React.useState(0); const handleNext = () => { setActiveStep((prevActiveStep) => prevActiveStep + 1); }; const handleBack = () => { setActiveStep((prevActiveStep) => prevActiveStep - 1); }; const handleReset = () => { setActiveStep(0); }; return ( {steps.map((step, index) => ( Last step ) : null } > {step.label} {step.description} ))} {activeStep === steps.length && ( All steps completed - you're finished )} ); } ``` ## Transition `StepContent` uses [Collapse](/material-ui/transitions/#collapse) by default. Use `slots.transition` and `slotProps.transition` to replace it with another transition or to pass transition props. ## Performance The content of a step is unmounted when closed. If you need to make the content available to search engines or render expensive component trees inside your modal while optimizing for interaction responsiveness it might be a good idea to keep the step mounted with: ```jsx ``` ## Mobile stepper This component implements a compact stepper suitable for a mobile device. It has more limited functionality than the vertical stepper. See [mobile steps](https://m1.material.io/components/steppers.html#steppers-types-of-steps) for its inspiration. The mobile stepper supports three variants to display progress through the available steps: text, dots, and progress. ### Text The current step and total number of steps are displayed as text. ```tsx import * as React from 'react'; import Box from '@mui/material/Box'; import { useTheme } from '@mui/material/styles'; import MobileStepper from '@mui/material/MobileStepper'; import Paper from '@mui/material/Paper'; import Typography from '@mui/material/Typography'; import Button from '@mui/material/Button'; import KeyboardArrowLeft from '@mui/icons-material/KeyboardArrowLeft'; import KeyboardArrowRight from '@mui/icons-material/KeyboardArrowRight'; const steps = [ { label: 'Select campaign settings', description: `For each ad campaign that you create, you can control how much you're willing to spend on clicks and conversions, which networks and geographical locations you want your ads to show on, and more.`, }, { label: 'Create an ad group', description: 'An ad group contains one or more ads which target a shared set of keywords.', }, { label: 'Create an ad', description: `Try out different ad text to see what brings in the most customers, and learn how to enhance your ads using features like ad extensions. If you run into any problems with your ads, find out how to tell if they're running and how to resolve approval issues.`, }, ]; export default function TextMobileStepper() { const theme = useTheme(); const [activeStep, setActiveStep] = React.useState(0); const maxSteps = steps.length; const handleNext = () => { setActiveStep((prevActiveStep) => prevActiveStep + 1); }; const handleBack = () => { setActiveStep((prevActiveStep) => prevActiveStep - 1); }; const nextButtonRef = React.useRef(null); const backButtonRef = React.useRef(null); const previousActiveStepRef = React.useRef(activeStep); // Manage focus when the active step changes. React.useEffect(() => { const previousActiveStep = previousActiveStepRef.current; previousActiveStepRef.current = activeStep; if (activeStep === 0 && previousActiveStep === 1) { // If the user is going back to the first step, focus the "Next" button. nextButtonRef.current!.focus(); return; } if (activeStep === maxSteps - 1 && previousActiveStep === maxSteps - 2) { // If the user is going to the last step, focus the "Back" button. backButtonRef.current!.focus(); } }, [activeStep, maxSteps]); return ( {steps[activeStep].label} {steps[activeStep].description} Next {theme.direction === 'rtl' ? ( ) : ( )} } backButton={ } /> ); } ``` ### Dots Use dots when the number of steps is small. ```tsx import * as React from 'react'; import { useTheme } from '@mui/material/styles'; import MobileStepper from '@mui/material/MobileStepper'; import Button from '@mui/material/Button'; import KeyboardArrowLeft from '@mui/icons-material/KeyboardArrowLeft'; import KeyboardArrowRight from '@mui/icons-material/KeyboardArrowRight'; const steps = 6; export default function DotsMobileStepper() { const theme = useTheme(); const [activeStep, setActiveStep] = React.useState(0); const handleNext = () => { setActiveStep((prevActiveStep) => prevActiveStep + 1); }; const handleBack = () => { setActiveStep((prevActiveStep) => prevActiveStep - 1); }; const nextButtonRef = React.useRef(null); const backButtonRef = React.useRef(null); const previousActiveStepRef = React.useRef(activeStep); // Manage focus when the active step changes. React.useEffect(() => { const previousActiveStep = previousActiveStepRef.current; previousActiveStepRef.current = activeStep; if (activeStep === 0 && previousActiveStep === 1) { // If the user is going back to the first step, focus the "Next" button. nextButtonRef.current!.focus(); return; } if (activeStep === steps - 1 && previousActiveStep === steps - 2) { // If the user is going to the last step, focus the "Back" button. backButtonRef.current!.focus(); } }, [activeStep]); return ( Next {theme.direction === 'rtl' ? ( ) : ( )} } backButton={ } /> ); } ``` ### Progress Use a progress bar when there are many steps, or if there are steps that need to be inserted during the process (based on responses to earlier steps). ```tsx import * as React from 'react'; import { useTheme } from '@mui/material/styles'; import MobileStepper from '@mui/material/MobileStepper'; import Button from '@mui/material/Button'; import KeyboardArrowLeft from '@mui/icons-material/KeyboardArrowLeft'; import KeyboardArrowRight from '@mui/icons-material/KeyboardArrowRight'; export default function ProgressMobileStepper() { const theme = useTheme(); const [activeStep, setActiveStep] = React.useState(0); const handleNext = () => { setActiveStep((prevActiveStep) => prevActiveStep + 1); }; const handleBack = () => { setActiveStep((prevActiveStep) => prevActiveStep - 1); }; const nextButtonRef = React.useRef(null); const backButtonRef = React.useRef(null); const previousActiveStepRef = React.useRef(activeStep); // Manage focus when the active step changes. React.useEffect(() => { const previousActiveStep = previousActiveStepRef.current; if (activeStep === 0 && previousActiveStep === 1) { // If the user is going back to the first step, focus the "Next" button. nextButtonRef.current!.focus(); } else if (activeStep === 5 && previousActiveStep === 4) { // If the user is going to the last step, focus the "Back" button. backButtonRef.current!.focus(); } previousActiveStepRef.current = activeStep; }, [activeStep]); return ( Next {theme.direction === 'rtl' ? ( ) : ( )} } backButton={ } /> ); } ``` # MobileStepper API ## Demos For examples and details on the usage of this React component, visit the component demo pages: - [Stepper](https://mui.com/material-ui/react-stepper/) ## Import ```jsx import MobileStepper from '@mui/material/MobileStepper'; // or import { MobileStepper } from '@mui/material'; ``` ## Props | Name | Type | Default | Required | Description | |------|------|---------|----------|-------------| | steps | `integer` | - | Yes | | | activeStep | `integer` | `0` | No | | | backButton | `node` | - | No | | | classes | `object` | - | No | Override or extend the styles applied to the component. | | nextButton | `node` | - | No | | | position | `'bottom' \| 'static' \| 'top'` | `'bottom'` | No | | | slotProps | `{ dot?: func \| object, dots?: func \| object, progress?: func \| object, root?: func \| object }` | `{}` | No | | | slots | `{ dot?: elementType, dots?: elementType, progress?: elementType, root?: elementType }` | `{}` | No | | | sx | `Array \| func \| object` | - | No | The system prop that allows defining system overrides as well as additional CSS styles. | | variant | `'dots' \| 'progress' \| 'text'` | `'dots'` | No | | > **Note**: The `ref` is forwarded to the root element. > Any other props supplied will be provided to the root element ([Paper](https://mui.com/material-ui/api/paper/)). ## Inheritance While not explicitly documented above, the props of the [Paper](https://mui.com/material-ui/api/paper/) component are also available on MobileStepper. ## Theme default props You can use `MuiMobileStepper` to change the default props of this component with the theme. ## Slots | Name | Default | Class | Description | |------|---------|-------|-------------| | root | `Paper` | `.MuiMobileStepper-root` | The component that renders the root slot. | | progress | `LinearProgress` | `.MuiMobileStepper-progress` | The component that renders the progress slot. | | dots | `'div'` | `.MuiMobileStepper-dots` | The component that renders the dots slot. | | dot | `'div'` | `.MuiMobileStepper-dot` | The component that renders the dot slot. | ## CSS ### Rule name | Global class | Rule name | Description | |--------------|-----------|-------------| | - | dotActive | Styles applied to a dot if `variant="dots"` and this is the active step. | | - | positionBottom | Styles applied to the root element if `position="bottom"`. | | - | positionStatic | Styles applied to the root element if `position="static"`. | | - | positionTop | Styles applied to the root element if `position="top"`. | ## Source code If you did not find the information on this page, consider having a look at the implementation of the component for more detail. - [/packages/mui-material/src/MobileStepper/MobileStepper.js](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material/src/MobileStepper/MobileStepper.js) # Step API ## Demos For examples and details on the usage of this React component, visit the component demo pages: - [Stepper](https://mui.com/material-ui/react-stepper/) ## Import ```jsx import Step from '@mui/material/Step'; // or import { Step } from '@mui/material'; ``` ## Props | Name | Type | Default | Required | Description | |------|------|---------|----------|-------------| | active | `bool` | - | No | | | children | `node` | - | No | | | classes | `object` | - | No | Override or extend the styles applied to the component. | | completed | `bool` | - | No | | | component | `elementType` | - | No | | | disabled | `bool` | - | No | | | expanded | `bool` | `false` | No | | | index | `integer` | - | No | | | last | `bool` | - | No | | | sx | `Array \| func \| object` | - | No | The system prop that allows defining system overrides as well as additional CSS styles. | > **Note**: The `ref` is forwarded to the root element (HTMLLIElement). > Any other props supplied will be provided to the root element (native element). ## Theme default props You can use `MuiStep` to change the default props of this component with the theme. ## CSS ### Rule name | Global class | Rule name | Description | |--------------|-----------|-------------| | - | alternativeLabel | Styles applied to the root element if `alternativeLabel={true}`. | | `.Mui-completed` | - | State class applied to the root element if `completed={true}`. | | - | horizontal | Styles applied to the root element if `orientation="horizontal"`. | | - | root | Styles applied to the root element. | | - | vertical | Styles applied to the root element if `orientation="vertical"`. | ## Source code If you did not find the information on this page, consider having a look at the implementation of the component for more detail. - [/packages/mui-material/src/Step/Step.js](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material/src/Step/Step.js) # StepButton API ## Demos For examples and details on the usage of this React component, visit the component demo pages: - [Stepper](https://mui.com/material-ui/react-stepper/) ## Import ```jsx import StepButton from '@mui/material/StepButton'; // or import { StepButton } from '@mui/material'; ``` ## Props | Name | Type | Default | Required | Description | |------|------|---------|----------|-------------| | children | `node` | - | No | | | classes | `object` | - | No | Override or extend the styles applied to the component. | | icon | `node` | - | No | | | optional | `node` | - | No | | | sx | `Array \| func \| object` | - | No | The system prop that allows defining system overrides as well as additional CSS styles. | > **Note**: The `ref` is forwarded to the root element (HTMLButtonElement). > Any other props supplied will be provided to the root element ([ButtonBase](https://mui.com/material-ui/api/button-base/)). ## Inheritance While not explicitly documented above, the props of the [ButtonBase](https://mui.com/material-ui/api/button-base/) component are also available on StepButton. ## Theme default props You can use `MuiStepButton` to change the default props of this component with the theme. ## CSS ### Rule name | Global class | Rule name | Description | |--------------|-----------|-------------| | - | horizontal | Styles applied to the root element if `orientation="horizontal"`. | | - | root | Styles applied to the root element. | | - | touchRipple | Styles applied to the `ButtonBase` touch-ripple. | | - | vertical | Styles applied to the root element if `orientation="vertical"`. | ## Source code If you did not find the information on this page, consider having a look at the implementation of the component for more detail. - [/packages/mui-material/src/StepButton/StepButton.js](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material/src/StepButton/StepButton.js) # StepConnector API ## Demos For examples and details on the usage of this React component, visit the component demo pages: - [Stepper](https://mui.com/material-ui/react-stepper/) ## Import ```jsx import StepConnector from '@mui/material/StepConnector'; // or import { StepConnector } from '@mui/material'; ``` ## Props | Name | Type | Default | Required | Description | |------|------|---------|----------|-------------| | classes | `object` | - | No | Override or extend the styles applied to the component. | | sx | `Array \| func \| object` | - | No | The system prop that allows defining system overrides as well as additional CSS styles. | > **Note**: The `ref` is forwarded to the root element (HTMLDivElement). > Any other props supplied will be provided to the root element (native element). ## Theme default props You can use `MuiStepConnector` to change the default props of this component with the theme. ## CSS ### Rule name | Global class | Rule name | Description | |--------------|-----------|-------------| | `.Mui-active` | - | State class applied to the root element if `active={true}`. | | - | alternativeLabel | Styles applied to the root element if `alternativeLabel={true}`. | | `.Mui-completed` | - | State class applied to the root element if `completed={true}`. | | `.Mui-disabled` | - | State class applied to the root element if `disabled={true}`. | | - | horizontal | Styles applied to the root element if `orientation="horizontal"`. | | - | line | Styles applied to the line element. | | - | root | Styles applied to the root element. | | - | vertical | Styles applied to the root element if `orientation="vertical"`. | ## Source code If you did not find the information on this page, consider having a look at the implementation of the component for more detail. - [/packages/mui-material/src/StepConnector/StepConnector.js](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material/src/StepConnector/StepConnector.js) # StepContent API ## Demos For examples and details on the usage of this React component, visit the component demo pages: - [Stepper](https://mui.com/material-ui/react-stepper/) ## Import ```jsx import StepContent from '@mui/material/StepContent'; // or import { StepContent } from '@mui/material'; ``` ## Props | Name | Type | Default | Required | Description | |------|------|---------|----------|-------------| | children | `node` | - | No | | | classes | `object` | - | No | Override or extend the styles applied to the component. | | slotProps | `{ transition?: func \| object }` | `{}` | No | | | slots | `{ transition?: elementType }` | `{}` | No | | | sx | `Array \| func \| object` | - | No | The system prop that allows defining system overrides as well as additional CSS styles. | | transitionDuration | `'auto' \| number \| { appear?: number, enter?: number, exit?: number }` | `'auto'` | No | | > **Note**: The `ref` is forwarded to the root element (HTMLDivElement). > Any other props supplied will be provided to the root element (native element). ## Theme default props You can use `MuiStepContent` to change the default props of this component with the theme. ## Slots | Name | Default | Class | Description | |------|---------|-------|-------------| | transition | `Collapse` | `.MuiStepContent-transition` | The component that renders the transition slot. [Follow this guide](/material-ui/transitions/#transition-slots) to learn more about the requirements for this component. | ## CSS ### Rule name | Global class | Rule name | Description | |--------------|-----------|-------------| | - | last | Styles applied to the root element if `last={true}` (controlled by `Step`). | | - | root | Styles applied to the root element. | ## Source code If you did not find the information on this page, consider having a look at the implementation of the component for more detail. - [/packages/mui-material/src/StepContent/StepContent.js](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material/src/StepContent/StepContent.js) # StepIcon API ## Demos For examples and details on the usage of this React component, visit the component demo pages: - [Stepper](https://mui.com/material-ui/react-stepper/) ## Import ```jsx import StepIcon from '@mui/material/StepIcon'; // or import { StepIcon } from '@mui/material'; ``` ## Props | Name | Type | Default | Required | Description | |------|------|---------|----------|-------------| | active | `bool` | `false` | No | | | classes | `object` | - | No | Override or extend the styles applied to the component. | | completed | `bool` | `false` | No | | | error | `bool` | `false` | No | | | icon | `node` | - | No | | | sx | `Array \| func \| object` | - | No | The system prop that allows defining system overrides as well as additional CSS styles. | > **Note**: The `ref` is forwarded to the root element (SVGSVGElement). > Any other props supplied will be provided to the root element ([SvgIcon](https://mui.com/material-ui/api/svg-icon/)). ## Inheritance While not explicitly documented above, the props of the [SvgIcon](https://mui.com/material-ui/api/svg-icon/) component are also available on StepIcon. ## Theme default props You can use `MuiStepIcon` to change the default props of this component with the theme. ## CSS ### Rule name | Global class | Rule name | Description | |--------------|-----------|-------------| | `.Mui-active` | - | State class applied to the root element if `active={true}`. | | `.Mui-completed` | - | State class applied to the root element if `completed={true}`. | | `.Mui-error` | - | State class applied to the root element if `error={true}`. | | - | root | Styles applied to the root element. | | - | text | Styles applied to the SVG text element. | ## Source code If you did not find the information on this page, consider having a look at the implementation of the component for more detail. - [/packages/mui-material/src/StepIcon/StepIcon.js](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material/src/StepIcon/StepIcon.js) # StepLabel API ## Demos For examples and details on the usage of this React component, visit the component demo pages: - [Stepper](https://mui.com/material-ui/react-stepper/) ## Import ```jsx import StepLabel from '@mui/material/StepLabel'; // or import { StepLabel } from '@mui/material'; ``` ## Props | Name | Type | Default | Required | Description | |------|------|---------|----------|-------------| | children | `node` | - | No | | | classes | `object` | - | No | Override or extend the styles applied to the component. | | error | `bool` | `false` | No | | | icon | `node` | - | No | | | optional | `node` | - | No | | | slotProps | `{ label?: func \| object, root?: func \| object, stepIcon?: func \| object }` | `{}` | No | | | slots | `{ label?: elementType, root?: elementType, stepIcon?: elementType }` | `{}` | No | | | sx | `Array \| func \| object` | - | No | The system prop that allows defining system overrides as well as additional CSS styles. | > **Note**: The `ref` is forwarded to the root element (HTMLSpanElement). > Any other props supplied will be provided to the root element (native element). ## Theme default props You can use `MuiStepLabel` to change the default props of this component with the theme. ## Slots | Name | Default | Class | Description | |------|---------|-------|-------------| | root | `span` | `.MuiStepLabel-root` | The component that renders the root. | | label | `span` | `.MuiStepLabel-label` | The component that renders the label. | | stepIcon | `undefined` | - | The component to render in place of the [`StepIcon`](https://mui.com/material-ui/api/step-icon/). | ## CSS ### Rule name | Global class | Rule name | Description | |--------------|-----------|-------------| | `.Mui-active` | - | State class applied to the label element if `active={true}`. | | - | alternativeLabel | State class applied to the root and icon container and label if `alternativeLabel={true}`. | | `.Mui-completed` | - | State class applied to the label element if `completed={true}`. | | `.Mui-disabled` | - | State class applied to the root and label elements if `disabled={true}`. | | `.Mui-error` | - | State class applied to the root and label elements if `error={true}`. | | - | horizontal | Styles applied to the root element if `orientation="horizontal"`. | | - | iconContainer | Styles applied to the `icon` container element. | | - | labelContainer | Styles applied to the container element which wraps label and `optional`. | | - | vertical | Styles applied to the root element if `orientation="vertical"`. | ## Source code If you did not find the information on this page, consider having a look at the implementation of the component for more detail. - [/packages/mui-material/src/StepLabel/StepLabel.js](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material/src/StepLabel/StepLabel.js) # Stepper API ## Demos For examples and details on the usage of this React component, visit the component demo pages: - [Stepper](https://mui.com/material-ui/react-stepper/) ## Import ```jsx import Stepper from '@mui/material/Stepper'; // or import { Stepper } from '@mui/material'; ``` ## Props | Name | Type | Default | Required | Description | |------|------|---------|----------|-------------| | activeStep | `integer` | `0` | No | | | alternativeLabel | `bool` | `false` | No | | | children | `node` | - | No | | | classes | `object` | - | No | Override or extend the styles applied to the component. | | component | `elementType` | - | No | | | connector | `element` | `` | No | | | nonLinear | `bool` | `false` | No | | | orientation | `'horizontal' \| 'vertical'` | `'horizontal'` | No | | | sx | `Array \| func \| object` | - | No | The system prop that allows defining system overrides as well as additional CSS styles. | > **Note**: The `ref` is forwarded to the root element (HTMLOListElement). > Any other props supplied will be provided to the root element (native element). ## Theme default props You can use `MuiStepper` to change the default props of this component with the theme. ## CSS ### Rule name | Global class | Rule name | Description | |--------------|-----------|-------------| | - | alternativeLabel | Styles applied to the root element if `alternativeLabel={true}`. | | - | horizontal | Styles applied to the root element if `orientation="horizontal"`. | | - | nonLinear | Styles applied to the root element if `nonLinear={true}`. | | - | root | Styles applied to the root element. | | - | vertical | Styles applied to the root element if `orientation="vertical"`. | ## Source code If you did not find the information on this page, consider having a look at the implementation of the component for more detail. - [/packages/mui-material/src/Stepper/Stepper.js](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material/src/Stepper/Stepper.js)