Arrofi Reza Satria
Arrofi Reza Satria

Reputation: 190

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

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

Upvotes: 4

Views: 998

Answers (1)

Hamidreza
Hamidreza

Reputation: 1565

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.

Upvotes: 0

Related Questions