Change ripple effect duration in MUI React

Viewed 702
1 Answers

From the source, the class name where the animationDuration is set is MuiTouchRipple-rippleVisible. You just need to override that value:

V5

<Button
  sx={{
    '&& .MuiTouchRipple-rippleVisible': {
      animationDuration: '200ms',
    },
  }}
>

Codesandbox Demo

V4

const theme = createTheme({
  overrides: {
    MuiButton: {
      root: {
        '& .MuiTouchRipple-rippleVisible': {
          animationDuration: '200ms',
        },
      },
    },
    // if you want to change the ripple duration of all components that have ripple
    // effect (e.g. Button, CardActionArea, FAB...)
    MuiTouchRipple: {
      rippleVisible: {
        animationDuration: '200ms',
      },
    },
  },
});

Codesandbox Demo

Related