material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

Shutdown animation

Open isergey opened this issue 11 years ago • 8 comments

Is it possible to implement a global switch off of animation? On slower computers lags occur during animation. Thanks.

isergey avatar Jun 16 '15 23:06 isergey

+1. need switch to turn off animation.

iyoukeyyewei avatar Jun 17 '15 00:06 iyoukeyyewei

Thanks @isergey - Dupe of #240

hai-cea avatar Jun 19 '15 19:06 hai-cea

As of the transition to javascript styling, the workaround in #240 does not work anymore. Is there an other way to disable animations?

treo avatar Aug 26 '15 08:08 treo

Setting disableTouchRipple={true} appears to handle it for buttons at least.

e.g.: <FlatButton disableTouchRipple={true}>w00t</FlatButton>

note: only tested with FlatButton, but from grepping the source for that prop it looks like it should work with other buttons (including datepicker buttons), and switches.

jonaustin avatar Feb 25 '16 23:02 jonaustin

disableTouchRipple={true} does not work with an icon in my experience. Example sandbox: https://codesandbox.io/s/3r82644prq

Inside CompareBar.js:

{sku.length ? (
    <Badge
        data-sku={sku}
        badgeContent={<CancelIcon />}
        onClick={(event, checked) => {
            props.dispatch(
                actionRemoveProduct(sku)
            );
        }}
    >
        <img
            alt={sku}
            src={product.image}
            style={{
                height: '50px',
                width: '50px'
            }}
        />
    </Badge>
) : (
    <AddBoxIcon
        disableTouchRipple={true}
        disableFocusRipple={true}
        style={{ fontSize: 50 }}
    />
)}

ryanpcmcquen avatar Apr 25 '18 17:04 ryanpcmcquen

Setting disableTouchRipple={true} appears to handle it for buttons at least.

e.g.: <FlatButton disableTouchRipple={true}>w00t</FlatButton>

note: only tested with FlatButton, but from grepping the source for that prop it looks like it should work with other buttons (including datepicker buttons), and switches.

This one is the best referenced answer after googling a lot of unsuccessfull answer, Thank you ( this is the cleanest way to do this, we can use css but I always search for the best solution provided )

note : Use case <ListItem disableFocusRipple = {true} disableTouchRipple = {true} ...

jimmyMisa avatar Aug 30 '19 14:08 jimmyMisa

As of Jan 3, 2021 <Component disableRipple = 'true' /> seem to be working for almost all Material UI components.

sadeqush avatar Jan 03 '21 10:01 sadeqush

Documented in https://next.material-ui.com/getting-started/faq/#how-can-i-disable-the-ripple-effect-globally

oliviertassinari avatar Jan 03 '21 10:01 oliviertassinari