Learus / react-material-ui-carousel

A Generic carousel UI component for React using Material UI.
MIT License
552 stars 220 forks source link

[Feature Request] Remove grow/shrink animation on Carousel Item render #187

Open Reaw opened 2 years ago

Reaw commented 2 years ago

When a Carousel Item is rendered there is a height transition to reach the desired height, which I would like to disable in my app.

Animation

This transition is triggered also when the size of the slides are dynamic (with different heights), so the carousel shrinks and grows in a weird way.

I would suggest adding a prop to the carousel to disable this growing and shrinking animation. So developers can decide if they want it or not. Maybe a prop like animateOnRender: boolean

clementlize commented 2 years ago

Hi, I've been struggling with this too. I went into the module code but saw nothing that I could fix easily. It doesn't seem like a feature, but more like a bug.

After playing around I found out that the shrink does not happen when setting the property swipe=false. This seems to be the only solution at the moment.

alexanderbh commented 2 years ago

It works for me as well with swipe={false}. That stops the buggy animation on render.

smttkin commented 5 days ago

It's still same