Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable Material UI's <LinearProgress /> animation

I am using Material-UI's <LinearProgress variant="determinate" /> component which by default transforms the scaleX() property of a <div> inside another <div> whenever the value changes to visualize the current progress. It does so with an easing effect to make everything look smooth which generally is quite nice, however for the purpose of my application (audio seekbar) I would like to disable this animation entirely whenever the value changes.

Is it possible?

  • Demo: codesandbox
like image 821
Dave Avatar asked Oct 26 '25 09:10

Dave


1 Answers

I was able to resolve this using overrides

bar: {
  transition: 'none'
}
...

...
<LinearProgress variant="determinate" classes={{ bar: classes.bar}} />
like image 177
Dave Avatar answered Oct 28 '25 03:10

Dave



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!