Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

183
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda