Stepper
Represent ordered or non-linear steps with explicit active and error state.
This guide covers Material UI Core with the default Emotion engine; extensions and additional demos are explicitly classified.
Use case and business boundary
The host owns workflow completion and validation; activeStep is not an automatic process engine.
Native composition and scope
MobileStepper, Step, StepButton, StepConnector, StepContent, StepIcon, StepLabel, Stepper
Preserve native Material UI composition and types; do not substitute JGuang UI/Base UI/Radix APIs. Example entries are not extra components.
Native installation and initialization
npm install @mui/material@9.4.0 @emotion/react@11.14.0 @emotion/styled@11.14.1
Use native npm and Emotion, not an invented JGuang UI Registry URL. Place examples inside native ThemeProvider; choose CssBaseline or ScopedCssBaseline for the project. Inspect React, existing providers, lockfile and SSR first. Never overwrite files or conceal peer conflicts. This batch verified React 19.2.8; React 18 and below require matching react-is. See the included bilingual setup guide.
Practical native parameters
These selected parameters are not a flattened universal API. Preserve the native declaring owner, slot structure, nullable values and generics.
| Owner.prop | Practical role | Declaration source |
|---|---|---|
Stepper.activeStep | Zero-based active workflow step index. | Stepper |
Stepper.nonLinear | Permit non-linear Stepper navigation; the host enforces actual prerequisites. | Stepper |
Stepper.orientation | Native horizontal/vertical orientation, with owner-specific layout behavior. | Stepper |
Step.completed | Host-controlled step-completion presentation; not automatic validation. | Step |
StepLabel.error | Native visual error state; the host supplies validation and recovery. | StepLabel |
Runnable native examples
Machine keys select example entries, not universal variant props. Native demo JSX/data stay unchanged; JGuang-authored acceptance fixtures are explicitly labelled.
- Linear ·
HorizontalLinearStepper· upstream native demo - Non-linear ·
HorizontalNonLinearStepper· upstream native demo - Alternative label ·
HorizontalLinearAlternativeLabelStepper· upstream native demo - Error step ·
HorizontalStepperWithError· upstream native demo - Customized horizontal stepper ·
CustomizedSteppers· upstream native demo - Vertical stepper ·
VerticalLinearStepper· upstream native demo - Alternative label ·
VerticalLinearAlternativeLabelStepper· upstream native demo - Text ·
TextMobileStepper· upstream native demo - Dots ·
DotsMobileStepper· upstream native demo - Progress ·
ProgressMobileStepper· upstream native demo
Actual usage example
Unmodified pinned native demo; copy its required local helper files together.
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<number>());
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<HTMLButtonElement>(null);
const nextButtonRef = React.useRef<HTMLButtonElement>(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 (
<Box sx={{ width: '100%' }}>
<Stepper activeStep={activeStep}>
{steps.map((label, index) => {
const stepProps: { completed?: boolean } = {};
const labelProps: {
optional?: React.ReactNode;
} = {};
if (isStepOptional(index)) {
labelProps.optional = (
<Typography variant="caption">Optional</Typography>
);
}
if (isStepSkipped(index)) {
stepProps.completed = false;
}
return (
<Step key={label} {...stepProps}>
<StepLabel {...labelProps}>{label}</StepLabel>
</Step>
);
})}
</Stepper>
{activeStep === steps.length ? (
<React.Fragment>
<Typography sx={{ mt: 2, mb: 1 }}>
All steps completed - you're finished
</Typography>
<Box sx={{ display: 'flex', flexDirection: 'row', pt: 2 }}>
<Box sx={{ flex: '1 1 auto' }} />
<Button onClick={handleReset} ref={resetButtonRef}>
Reset
</Button>
</Box>
</React.Fragment>
) : (
<React.Fragment>
<Typography sx={{ mt: 2, mb: 1 }}>Step {activeStep + 1}</Typography>
<Box sx={{ display: 'flex', flexDirection: 'row', pt: 2 }}>
<Button
color="inherit"
disabled={activeStep === 0}
onClick={handleBack}
sx={{ mr: 1 }}
>
Back
</Button>
<Box sx={{ flex: '1 1 auto' }} />
{isStepOptional(activeStep) && (
<Button color="inherit" onClick={handleSkip} sx={{ mr: 1 }}>
Skip
</Button>
)}
<Button onClick={handleNext} ref={nextButtonRef}>
{activeStep === steps.length - 1 ? 'Finish' : 'Next'}
</Button>
</Box>
</React.Fragment>
)}
</Box>
);
}
Example dependency boundaries
react, @mui/material/Box, @mui/material/Stepper, @mui/material/Step, @mui/material/StepLabel, @mui/material/Button, @mui/material/Typography, @mui/material/StepButton, @mui/material/styles, @mui/material/Stack, @mui/icons-material/Check, @mui/icons-material/Settings, @mui/icons-material/GroupAdd, @mui/icons-material/VideoLabel, @mui/material/StepConnector, @mui/material/StepIcon, @mui/material/StepContent, @mui/material/Paper, @mui/material/MobileStepper, @mui/icons-material/KeyboardArrowLeft, @mui/icons-material/KeyboardArrowRight
Direct Icons/System/Utils example imports require their matching 9.4.0 packages. Relative data/helpers are part of the example closure, not extra components. Remote images and simulated operations do not supply a backend.
Pinned upstream API metadata reference
These tables retain the upstream metadata, not a newly inferred generic type system. Conditional generics, inherited props and callback details are defined by the source declarations below. Theme defaults may override metadata defaults.
MobileStepper
import MobileStepper from '@mui/material/MobileStepper';
import { MobileStepper } from '@mui/material';
Native inheritance: Paper. Parent/DOM props are not fabricated as additional own props.
| Prop | Required | Upstream metadata type / constraint | Metadata default |
|---|---|---|---|
steps | yes | integer | — |
activeStep | no | integer | 0 |
backButton | no | node | — |
classes | no | object | — |
nextButton | no | node | — |
position | no | 'bottom' | 'static' | 'top' | 'bottom' |
slotProps | no | { dot?: func | object, dots?: func | object, progress?: func | object, root?: func | object } | {} |
slots | no | { dot?: elementType, dots?: elementType, progress?: elementType, root?: elementType } | {} |
sx | no | Array<func | object | bool> | func | object | — |
variant | no | 'dots' | 'progress' | 'text' | 'dots' |
Step
import Step from '@mui/material/Step';
import { Step } from '@mui/material';
| Prop | Required | Upstream metadata type / constraint | Metadata default |
|---|---|---|---|
active | no | bool | — |
children | no | node | — |
classes | no | object | — |
completed | no | bool | — |
component | no | elementType | — |
disabled | no | bool | — |
expanded | no | bool | false |
index | no | integer | — |
last | no | bool | — |
sx | no | Array<func | object | bool> | func | object | — |
StepButton
import StepButton from '@mui/material/StepButton';
import { StepButton } from '@mui/material';
Native inheritance: ButtonBase. Parent/DOM props are not fabricated as additional own props.
| Prop | Required | Upstream metadata type / constraint | Metadata default |
|---|---|---|---|
children | no | node | — |
classes | no | object | — |
icon | no | node | — |
optional | no | node | — |
sx | no | Array<func | object | bool> | func | object | — |
StepConnector
import StepConnector from '@mui/material/StepConnector';
import { StepConnector } from '@mui/material';
| Prop | Required | Upstream metadata type / constraint | Metadata default |
|---|---|---|---|
classes | no | object | — |
sx | no | Array<func | object | bool> | func | object | — |
StepContent
import StepContent from '@mui/material/StepContent';
import { StepContent } from '@mui/material';
| Prop | Required | Upstream metadata type / constraint | Metadata default |
|---|---|---|---|
children | no | node | — |
classes | no | object | — |
slotProps | no | { transition?: func | object } | {} |
slots | no | { transition?: elementType } | {} |
sx | no | Array<func | object | bool> | func | object | — |
transitionDuration | no | 'auto' | number | { appear?: number, enter?: number, exit?: number } | 'auto' |
StepIcon
import StepIcon from '@mui/material/StepIcon';
import { StepIcon } from '@mui/material';
Native inheritance: SvgIcon. Parent/DOM props are not fabricated as additional own props.
| Prop | Required | Upstream metadata type / constraint | Metadata default |
|---|---|---|---|
active | no | bool | false |
classes | no | object | — |
completed | no | bool | false |
error | no | bool | false |
icon | no | node | — |
sx | no | Array<func | object | bool> | func | object | — |
StepLabel
import StepLabel from '@mui/material/StepLabel';
import { StepLabel } from '@mui/material';
| Prop | Required | Upstream metadata type / constraint | Metadata default |
|---|---|---|---|
children | no | node | — |
classes | no | object | — |
error | no | bool | false |
icon | no | node | — |
optional | no | node | — |
slotProps | no | { label?: func | object, root?: func | object, stepIcon?: func | object } | {} |
slots | no | { label?: elementType, root?: elementType, stepIcon?: elementType } | {} |
sx | no | Array<func | object | bool> | func | object | — |
Stepper
import Stepper from '@mui/material/Stepper';
import { Stepper } from '@mui/material';
| Prop | Required | Upstream metadata type / constraint | Metadata default |
|---|---|---|---|
activeStep | no | integer | 0 |
alternativeLabel | no | bool | false |
children | no | node | — |
classes | no | object | — |
component | no | elementType | — |
connector | no | element | <StepConnector /> |
nonLinear | no | bool | false |
orientation | no | 'horizontal' | 'vertical' | 'horizontal' |
sx | no | Array<func | object | bool> | func | object | — |
Native source declarations
Declarations/imports are extracted from pinned source without flattening unions or external inheritance. Original English comments/types are source reference, not a claim of translated upstream prose. Shared types stay in their native packages.
vendor/src/MobileStepper/MobileStepper.d.ts
import * as React from 'react';
import { SxProps } from '@mui/system';
import { Theme } from '../styles';
import { InternalStandardProps as StandardProps } from '../internal';
import { PaperProps } from '../Paper';
import { LinearProgressProps } from '../LinearProgress';
import { MobileStepperClasses } from './mobileStepperClasses';
import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
export interface MobileStepperSlots {
/**
* The component that renders the root slot.
* @default Paper
*/
root: React.ElementType;
/**
* The component that renders the progress slot.
* @default LinearProgress
*/
progress: React.ElementType;
/**
* The component that renders the dots slot.
* @default 'div'
*/
dots: React.ElementType;
/**
* The component that renders the dot slot.
* @default 'div'
*/
dot: React.ElementType;
}
export interface MobileStepperRootSlotPropsOverrides {}
export interface MobileStepperProgressSlotPropsOverrides {}
export interface MobileStepperDotsSlotPropsOverrides {}
export interface MobileStepperDotSlotPropsOverrides {}
export type MobileStepperSlotsAndSlotProps = CreateSlotsAndSlotProps<
MobileStepperSlots,
{
/**
* Props forwarded to the root slot.
* By default, the available props are based on the [Paper](https://mui.com/material-ui/api/paper/#props) component.
*/
root: SlotProps<
React.ElementType<PaperProps>,
MobileStepperRootSlotPropsOverrides,
MobileStepperOwnerState
>;
/**
* Props forwarded to the progress slot.
* By default, the available props are based on the [LinearProgress](https://mui.com/material-ui/api/linear-progress/#props) component.
*/
progress: SlotProps<
React.ElementType<LinearProgressProps>,
MobileStepperProgressSlotPropsOverrides,
MobileStepperOwnerState
>;
/**
* Props forwarded to the dots slot.
* By default, the available props are based on the div element.
*/
dots: SlotProps<'div', MobileStepperDotsSlotPropsOverrides, MobileStepperOwnerState>;
/**
* Props forwarded to the dot slot.
* By default, the available props are based on the div element.
*/
dot: SlotProps<'div', MobileStepperDotSlotPropsOverrides, MobileStepperOwnerState>;
}
>;
export interface MobileStepperProps
extends StandardProps<PaperProps, 'children' | 'variant'>, MobileStepperSlotsAndSlotProps {
/**
* Set the active step (zero based index).
* Defines which dot is highlighted when the variant is 'dots'.
* @default 0
*/
activeStep?: number | undefined;
/**
* A back button element. For instance, it can be a `Button` or an `IconButton`.
*/
backButton: React.ReactNode;
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<MobileStepperClasses> | undefined;
/**
* A next button element. For instance, it can be a `Button` or an `IconButton`.
*/
nextButton: React.ReactNode;
/**
* Set the positioning type.
* @default 'bottom'
*/
position?: 'bottom' | 'top' | 'static' | undefined;
/**
* The total steps.
*/
steps: number;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme> | undefined;
/**
* The variant to use.
* @default 'dots'
*/
variant?: 'text' | 'dots' | 'progress' | undefined;
}
export interface MobileStepperOwnerState extends Omit<MobileStepperProps, 'slots' | 'slotProps'> {}
export default function MobileStepper(props: MobileStepperProps): React.JSX.Element;
vendor/src/Step/Step.d.ts
import * as React from 'react';
import { SxProps } from '@mui/system';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
import { Theme } from '../styles';
import { StepClasses } from './stepClasses';
export interface StepOwnProps {
/**
* Sets the step as active. Is passed to child components.
*/
active?: boolean | undefined;
/**
* Should be `Step` sub-components such as `StepLabel`, `StepContent`.
*/
children?: React.ReactNode;
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<StepClasses> | undefined;
/**
* Mark the step as completed. Is passed to child components.
*/
completed?: boolean | undefined;
/**
* If `true`, the step is disabled, will also disable the button if
* `StepButton` is a child of `Step`. Is passed to child components.
*/
disabled?: boolean | undefined;
/**
* Expand the step.
* @default false
*/
expanded?: boolean | undefined;
/**
* The position of the step.
* The prop defaults to the value inherited from the parent Stepper component.
*/
index?: number | undefined;
/**
* If `true`, the Step is displayed as rendered last.
* The prop defaults to the value inherited from the parent Stepper component.
*/
last?: boolean | undefined;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme> | undefined;
}
export interface StepTypeMap<
AdditionalProps = {},
RootComponent extends React.ElementType = 'div',
> {
props: AdditionalProps & StepOwnProps;
defaultComponent: RootComponent;
}
export type StepProps<
RootComponent extends React.ElementType = StepTypeMap['defaultComponent'],
AdditionalProps = { component?: React.ElementType | undefined },
> = OverrideProps<StepTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
component?: React.ElementType | undefined;
};
export type StepClasskey = keyof NonNullable<StepProps['classes']>;
declare const Step: OverridableComponent<StepTypeMap>;
vendor/src/StepButton/StepButton.d.ts
import * as React from 'react';
import { SxProps } from '@mui/system';
import { ButtonBaseTypeMap, ExtendButtonBase, ExtendButtonBaseTypeMap } from '../ButtonBase';
import { OverrideProps } from '../OverridableComponent';
import { Theme } from '../styles';
import { StepButtonClasses } from './stepButtonClasses';
export interface StepButtonOwnProps {
/**
* Can be a `StepLabel` or a node to place inside `StepLabel` as children.
*/
children?: React.ReactNode;
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<StepButtonClasses> | undefined;
/**
* The icon displayed by the step label.
*/
icon?: React.ReactNode;
/**
* The optional node to display.
*/
optional?: React.ReactNode;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme> | undefined;
}
export type StepButtonTypeMap<
AdditionalProps,
RootComponent extends React.ElementType,
> = ExtendButtonBaseTypeMap<{
props: AdditionalProps & StepButtonOwnProps;
defaultComponent: RootComponent;
ignoredProps: 'disabled';
}>;
declare const StepButton: ExtendButtonBase<
StepButtonTypeMap<{}, ButtonBaseTypeMap['defaultComponent']>
>;
export type StepButtonClasskey = keyof NonNullable<StepButtonProps['classes']>;
export type StepButtonProps<
RootComponent extends React.ElementType = ButtonBaseTypeMap['defaultComponent'],
AdditionalProps = {},
> = OverrideProps<StepButtonTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
component?: React.ElementType | undefined;
};
vendor/src/StepConnector/StepConnector.d.ts
import * as React from 'react';
import { SxProps } from '@mui/system';
import { Theme } from '../styles';
import { InternalStandardProps as StandardProps } from '../internal';
import { StepConnectorClasses } from './stepConnectorClasses';
export type StepConnectorIcon = React.ReactElement<unknown> | string | number;
export interface StepConnectorProps extends StandardProps<
React.HTMLAttributes<HTMLDivElement>,
'children'
> {
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<StepConnectorClasses> | undefined;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme> | undefined;
}
export type StepConnectorClasskey = keyof NonNullable<StepConnectorProps['classes']>;
export default function StepConnector(props: StepConnectorProps): React.JSX.Element;
vendor/src/StepContent/StepContent.d.ts
import * as React from 'react';
import { SxProps } from '@mui/system';
import { Theme } from '../styles';
import { InternalStandardProps as StandardProps } from '../internal';
import { CollapseProps } from '../Collapse';
import { TransitionProps } from '../transitions/types';
import { StepContentClasses } from './stepContentClasses';
import { CreateSlotsAndSlotProps, SlotComponentProps } from '../utils/types';
export interface StepContentSlots {
/**
* The component that renders the transition slot.
* [Follow this guide](/material-ui/transitions/#transition-slots) to learn more about the requirements for this component.
* @default Collapse
*/
transition?:
| React.JSXElementConstructor<TransitionProps & { children: React.ReactElement<unknown, any> }>
| undefined;
}
export type StepContentSlotsAndSlotProps = CreateSlotsAndSlotProps<
StepContentSlots,
{
/**
* Props forwarded to the transition slot.
* By default, the available props are based on the [Collapse](https://mui.com/material-ui/api/collapse/#props) component
*/
transition: SlotComponentProps<
React.ElementType<CollapseProps>,
CollapseProps,
StepContentOwnerState
>;
}
>;
export interface StepContentOwnerState extends StepContentProps {}
export interface StepContentProps
extends StandardProps<React.HTMLAttributes<HTMLDivElement>>, StepContentSlotsAndSlotProps {
/**
* The content of the component.
*/
children?: React.ReactNode;
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<StepContentClasses> | undefined;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme> | undefined;
/**
* Adjust the duration of the content expand transition.
* Passed as a prop to the transition component.
*
* Set to 'auto' to automatically calculate transition time based on height.
* @default 'auto'
*/
transitionDuration?: TransitionProps['timeout'] | 'auto' | undefined;
}
export type StepContentClasskey = keyof NonNullable<StepContentProps['classes']>;
export default function StepContent(props: StepContentProps): React.JSX.Element;
vendor/src/StepIcon/StepIcon.d.ts
import * as React from 'react';
import { SxProps } from '@mui/system';
import { SvgIconOwnProps } from '../SvgIcon';
import { Theme } from '../styles';
import { InternalStandardProps as StandardProps } from '../internal';
import { StepIconClasses } from './stepIconClasses';
export interface StepIconProps
// TODO v7: extend React.HTMLAttributes<SVGSVGElement> as svg is root component of StepIcon not div
extends
StandardProps<React.HTMLAttributes<HTMLDivElement>, 'color' | 'children'>,
Omit<SvgIconOwnProps, 'children'> {
/**
* Whether this step is active.
* @default false
*/
active?: boolean | undefined;
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<StepIconClasses> | undefined;
/**
* Mark the step as completed. Is passed to child components.
* @default false
*/
completed?: boolean | undefined;
/**
* If `true`, the step is marked as failed.
* @default false
*/
error?: boolean | undefined;
/**
* The label displayed in the step icon.
*/
icon: React.ReactNode;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme> | undefined;
}
export type StepIconClasskey = keyof NonNullable<StepIconProps['classes']>;
export default function StepIcon(props: StepIconProps): React.JSX.Element;
vendor/src/StepLabel/StepLabel.d.ts
import * as React from 'react';
import { SxProps } from '@mui/system';
import { Theme } from '../styles';
import { InternalStandardProps as StandardProps } from '../internal';
import { StepIconProps } from '../StepIcon';
import { StepLabelClasses } from './stepLabelClasses';
import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
export interface StepLabelSlots {
/**
* The component that renders the root.
* @default span
*/
root: React.ElementType;
/**
* The component that renders the label.
* @default span
*/
label: React.ElementType;
/**
* The component to render in place of the [`StepIcon`](https://mui.com/material-ui/api/step-icon/).
*/
stepIcon: React.ElementType;
}
export type StepLabelSlotsAndSlotProps = CreateSlotsAndSlotProps<
StepLabelSlots,
{
/**
* Props forwarded to the root slot.
* By default, the available props are based on the span element.
*/
root: SlotProps<'span', {}, StepLabelOwnerState>;
/**
* Props forwarded to the label slot.
* By default, the available props are based on the span element.
*/
label: SlotProps<'span', {}, StepLabelOwnerState>;
/**
* Props forwarded to the stepIcon slot.
* By default, the available props are based on the div element.
*/
stepIcon: SlotProps<React.ElementType<StepIconProps>, {}, StepLabelOwnerState>;
}
>;
export interface StepLabelOwnerState extends StepLabelProps {}
export interface StepLabelProps
extends StandardProps<React.HTMLAttributes<HTMLDivElement>>, StepLabelSlotsAndSlotProps {
/**
* In most cases will simply be a string containing a title for the label.
*/
children?: React.ReactNode;
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<StepLabelClasses> | undefined;
/**
* If `true`, the step is marked as failed.
* @default false
*/
error?: boolean | undefined;
/**
* Override the default label of the step icon.
*/
icon?: React.ReactNode;
/**
* The optional node to display.
*/
optional?: React.ReactNode;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme> | undefined;
}
export type StepLabelClasskey = keyof NonNullable<StepLabelProps['classes']>;
declare const StepLabel: ((props: StepLabelProps) => React.JSX.Element) & {
muiName: string;
};
vendor/src/Stepper/Stepper.d.ts
import * as React from 'react';
import { SxProps } from '@mui/system';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
import { Theme } from '../styles';
import { PaperProps } from '../Paper';
import { StepperClasses } from './stepperClasses';
export type Orientation = 'horizontal' | 'vertical';
export interface StepperOwnProps extends Pick<PaperProps, 'elevation' | 'square' | 'variant'> {
/**
* Set the active step (zero based index).
* Set to -1 to disable all the steps.
* @default 0
*/
activeStep?: number | undefined;
/**
* If set to 'true' and orientation is horizontal,
* then the step label will be positioned under the icon.
* If set to 'true' and orientation is vertical,
* it reverses the position of the label and content.
* @default false
*/
alternativeLabel?: boolean | undefined;
/**
* Two or more `<Step />` components.
*/
children?: React.ReactNode;
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<StepperClasses> | undefined;
/**
* An element to be placed between each step.
* @default <StepConnector />
*/
connector?: React.ReactElement<unknown, any> | null | undefined;
/**
* If set the `Stepper` will not assist in controlling steps for linear flow.
* @default false
*/
nonLinear?: boolean | undefined;
/**
* The component orientation (layout flow direction).
* @default 'horizontal'
*/
orientation?: Orientation | undefined;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme> | undefined;
}
export interface StepperTypeMap<
AdditionalProps = {},
RootComponent extends React.ElementType = 'div',
> {
props: AdditionalProps & StepperOwnProps;
defaultComponent: RootComponent;
}
export type StepperProps<
RootComponent extends React.ElementType = StepperTypeMap['defaultComponent'],
AdditionalProps = { component?: React.ElementType | undefined },
> = OverrideProps<StepperTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
component?: React.ElementType | undefined;
};
export type StepperClasskey = keyof NonNullable<StepperProps['classes']>;
declare const Stepper: OverridableComponent<StepperTypeMap>;
Post-install acceptance
Run strict types, production build and real interactions. Check keyboard labels/focus, disabled/error/read-only semantics where natively supported, both themes, narrow screens and reduced motion. Verify callbacks against the real host data; do not declare installation complete from copying a prompt. Initialization fixtures also require server HTML and warning-free hydration.
Source and license
https://github.com/mui/material-ui/tree/809a7717b4c050ba3f69b75300689f07c050a16e
MIT · @mui/material@9.4.0. Vendor originals and license are preserved. Full original upstream prose remains in vendor/docs and is not represented as fully translated.