DEV Community

Md Wahiduzzaman Emon
Md Wahiduzzaman Emon

Posted on

Answer: Best way to dim/disable a div in Material-UI?

opacity: contidion ? 0.5 : 1,
pointerEvents: contidion ? "none" : "auto",

use sx props or style in material to disable

<Box sx={{ opacity: <contidion> ? 0.5 : 1,pointerEvents:<contidion> ? "none" : "auto"}}/>

you can use this way any kind of div/tag in html

Top comments (0)