drcmda / mauerwerk

⚒ A react-spring driven masonry-like grid with enter/exit and shared element transitions
MIT License
836 stars 55 forks source link

disable animation #8

Closed nirsnappy closed 4 years ago

nirsnappy commented 5 years ago

hi we want to disable animation on mobile, transitionMount={false} didnt work for us. any other options we miss ?

drcmda commented 5 years ago

It should be possible to give it a config with immediate set to true.

<Grid config={{ immediate: true }} ... />
nirsnappy commented 5 years ago

thanks for the response. amm i actually can't see the differences with it or without it . any other ideas ? :) (i can still see the animation of the grid items coming from left side to the screen)

drcmda commented 5 years ago

i was confused, immediate isn't part of the config, but the spring. the spring itself needs to get this property.

The easiest right now would probably to base on this https://codesandbox.io/s/26mjowzpr?from-embed and make your own rules. if you set immediate: true in there, it will work.

drcmda commented 5 years ago

Or make a quick PR if you need it here.