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

124
Vistas
Change default material ui radio checked color

I have taken a look at other threads relating to this but unfortunately I am not able to change the material ui default red checked colour.

Here is my code below:

   return (
        <FormControl>
            <FormLabel>{label}</FormLabel>
            <RadioGroup row
                name={name}
                value={value}
                onChange={onChange}
                {
                    items.map(
                        item => (
                            <FormControlLabel key={item.id} value={item.id} control={<Radio />} label={item.title} />
                        )
                    )
                }
            </RadioGroup>
        </FormControl>
    )

I simply want to be able to change the checked radio color from red to blue.

I have tried the following but didn't work:

<Radio
  {...props}
  sx={{
    '&, &.Mui-checked': {
      color: 'blue',
    },
  }}
/>
about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

Because you use 2 selectors - & and &.Mui-checked you overwrite the color of your checkbox in an unchecked state. Therefore, you should get rid of & and everything will work fine:

      <Radio
        {...props}
        sx={{
          color: "red",
          "&.Mui-checked": {
            color: "green"
          }
        }}
      />

Demo

about 4 years ago · Santiago Gelvez 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