How to find out style applied based on component props in material Ui v5 through browser dev tools?

Viewed 347

In Material UI v4 I can find out which styles is applied by component props classname through browser dev tools. This makes easier for me to be able to override the spesific styles of the component. But in Material UI v5 I Didnt know which classname styles is applied browser dev tools. How can I know applied classname styles, like .MuiButton-contained in Material UI v5 ?

Button variant="contained" in Material UI v4

Button contained Material UI v4

Button variant="contained" in Material UI V5

enter image description here

1 Answers

All styles are applied to .MuiButtonBase-root-Mui-Button-root

@mui/styles is the legacy styling solution for MUI. It is deprecated in v5. It depends on JSS as a styling solution, which is not used in the @mui/material anymore.

Use the sx prop instead.

Related