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

323
Vistas
Problem using dark theme in MUI and leads to layout that is not clear

I am currently using modal for some use in my authentication form. However, I'm having trouble with the css.

enter image description here

Currently the modal is in a theme provider:

<ThemeProvider theme={theme}>
...

<Modal
        open={open}
        onClose={handleClose}
        aria-labelledby="modal-modal-title"
        aria-describedby="modal-modal-description"
      >
        <Box
          sx={{ width: 400 }}
          style={{
            position: "absolute",
            top: "50%",
            left: "50%",
            transform: "translate(-50%, -50%)",
            width: 400,
            border: "2px solid #000",
            boxShadow: 24,
            p: 4,
          }}
        >
          <Typography id="modal-modal-title" variant="h6" component="h2">
            Verification
          </Typography>
          <p>Please enter the verification code sent to your email.</p>
          <TextField
            label="Standard"
            variant="standard"
            onChange={(e) => setVerifyCode(e.target.value)}
          ></TextField>
          <Button variant="outlined" onClick={() => handleVerify(verifyCode)}>
            Verify
          </Button>
        </Box>
      </Modal>
</ThemeProvider>

where I write the custom theme:

const theme = createTheme({
  palette: {
    mode: "dark",
    primary: {
      main: "#bda06a",
    },
    secondary: {
      main: "#f5f200",
    },
  },
  typography: {
    fontFamily: "Cormorant",
    //fontFamily: "Castellar",
  },
  modal: {
    bgcolor: "#ffffff", //even if i write this it doen not work.
  },
});

However, as shown in the picture, the half-transparent background mess everything up. I was wondering how to change the style (an at where) so that the modal shows its content very clearly? I would be very appreciated if anyone could help!

about 4 years ago · Juan Pablo Isaza
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