Material-UI uses the same theme helper for creating all its transitions. Therefore you can disable all transitions by overriding the helper in your theme:
1 2 3 4 5 6 7 8 | import { createMuiTheme } from '@material-ui/core'; const theme = createMuiTheme({ transitions: { // So we have `transition: none;` everywhere create: () => 'none', }, }); |
It can be useful to disable transitions during visual testing or to improve performance on low-end devices.
You can go one step further by disabling all transitions and animations effects:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | import { createMuiTheme } from '@material-ui/core'; const theme = createMuiTheme({ overrides: { // Name of the component MuiCssBaseline: { // Name of the rule '@global': { '*, *::before, *::after': { transition: 'none !important', animation: 'none !important', }, }, }, }, }); |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.