Disabling animations either per-component or globally
See original GitHub issueI find the performance really suffers on some mobile devices whenever any animations are happening.
I’d ideally like to be able to disable animations per component, or if not, globally.
Ideally there’d be an option like so:
<ExpansionPanel animate={false}>
...
</ExpansionPanel>
As far as I can tell, this is not currently possible.
Firstly - is there a workaround where I can disable animations with css overrides?
Secondly - should this be considered for being added as a feature?
- I have searched the issues of this repository and believe that this is not a duplicate.
Your Environment
Tech | Version |
---|---|
Material-UI | 1.0.0-beta.33 |
React | 16.2.0 |
browser | any on low-powered devices |
Thanks in advance!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Disabling animations either per-component or globally #10560
I'd ideally like to be able to disable animations per component, or if not, globally. Ideally there'd be an option like so: <ExpansionPanel ......
Read more >Turn off Office animations - Microsoft Support
To turn off Microsoft 365 animations in Windows 7 or 8. Open the Ease of Access Center by pressing the Windows logo key...
Read more >setAnimationsEnabled(_:) | Apple Developer Documentation
Animations are enabled by default. If you disable animations, code inside subsequent animation blocks is still executed but no animations actually occur.
Read more >Skinned Mesh Renderer component - Unity - Manual
Disable this option to stop skinning when the GameObject is off-screen and ... Receive Global Illumination, Whether Unity provides global illumination data ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jacobweber Yes, of course. You can do the following.
Some peope will want to enable this behavior conditionally, for instance when serving an android user. In these cases, they can dynamically change the theme value.
I think that it would be breat to have a demo in the documentation or at least have this use case listed under the FAQ. Anyone wants to work on it? Thank you!
@tom-james-watson We use
theme.transitions.create()
almost everywhere to create the transitions, by overriding this method in the theme, you should easily be able to disable the transition globally. Adding the fact that the theme can be nested, you should be able to build a<DisableTransition />
component easily to cherrypick.@xemasiv The ripple can be disabled globally as documented here: https://material-ui.com/customization/themes/#properties.