Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

182
Views
Material UI's Stepper Component's error state showing unwanted icon

Im using Material UI's Stepper component and trying to get the fill of a stepper that is in its error state to be red.

For reference, here is the Stepper component in Material UI's docs.

enter image description here

So im trying to show an error state. Material UI's has an error prop that will show the error state, however, I dont want the icon provided.

enter image description here

I just want it to be like any other stepper, just with a red background.

Is there any way I can get rid of that icon, and just show a red fill?

Been search all over but seems like no one really asked about this.

Here is my code:

<Stepper alternativeLabel activeStep={this.determineFormStep()} connector={<StepConnector />} className={classes.stepper}>
          {formLabels.map((label) => {
            return (
              <Step key={label}>
                <StepLabel
                  error
                  StepIconProps={{
                    classes: {
                      root: classes.step,
                      completed: classes.completed,
                      active: classes.active,
                      error: classes.error,
                      disabled: classes.disabled
                    }
                  }}>
                  <div className={classes.stepLabelRoot}>
                    <Typography className={classes.label}>
                      {label.label}
                    </Typography>
                    <span className={classes.sublabel}>
                      {label.sublabel1}
                    </span>
                    <span className={classes.sublabel}>
                      {label.sublabel2}
                    </span>
                    <span className={classes.sublabel}>
                      {label.sublabel3}
                    </span>
                  </div>
                </StepLabel>
              </Step>);
          })}
        </Stepper>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The docs for StepLabel show that it can take an optional icon prop, which is a node that overrides the step icon.

As an example, if you wanted to hide the icon entirely you could pass a Fragment element as the icon:

<StepLabel
    error
    icon={<></>}
>
    ...
</StepLabel>

Or you can change the StepIconComponent or StepIconProps.

Here is an example turns off the error state on the icon only:

<StepLabel
    error
    StepIconProps={ {error: false} }
>
    ...
</StepLabel>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!