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

801
Views
¿Cómo cambiar el color de fondo y el desenfoque mui5 modal?

Estoy usando mui5 modal, el fondo modal es negro claro.

Código modal Mui

ingrese la descripción de la imagen aquí ¿Necesito cambiar el desenfoque de fondo y el blanco? Adjunté la salida necesaria a continuación

ingrese la descripción de la imagen aquí

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Para agregar el desenfoque, agregue este estilo al Modal:

 <Modal open={open} onClose={handleClose} aria-labelledby="modal-modal-title" aria-describedby="modal-modal-description" style={{ backdropFilter: "blur(5px)" }} >

y para el color de fondo cambie los estilos de Caja:

 const style = { position: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", width: 400, bgcolor: "background.paper", // Change to whatever color you want border: "2px solid #000", boxShadow: 24, p: 4 }; ... return ( <div> <Button onClick={handleOpen}>Open modal</Button> <Modal open={open} onClose={handleClose} aria-labelledby="modal-modal-title" aria-describedby="modal-modal-description" style={{ backdropFilter: "blur(5px)" }} > {/* Apply styles here: */} <Box sx={style}> <Typography id="modal-modal-title" variant="h6" component="h2"> Text in a modal </Typography> <Typography id="modal-modal-description" sx={{ mt: 2 }}> Duis mollis, est non commodo luctus, nisi erat porttitor ligula. </Typography> </Box> </Modal> </div> );

Para el color de fondo fuera del modal, cambie los estilos del Modal:

 style={{ backdropFilter: "blur(5px)", backgroundColor: "rgb(200, 0, 0, 0.5)" }}

zona de pruebas de código

about 4 years ago · Juan Pablo Isaza Report

0

Usando sx prop directamente en el componente Modal:

 <Modal sx={{ "& > .MuiBackdrop-root" : { backdropFilter: "blur(2px)" } }} open={open} onClose={handleClose} . . />
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!