rnosov / react-reveal

Easily add reveal on scroll animations to your React app
https://www.react-reveal.com/
MIT License
2.73k stars 179 forks source link

Option to disable reveal animations #61

Open JensVanAssche opened 5 years ago

JensVanAssche commented 5 years ago

I don't think this exists in the package yet: an option to disable reveal animations. And in extension: conditionally disable the animations (when the viewport is a certain size for example). This would be really helpful to disable the animations on mobile for example.

Thanks in advance!

Fziliotti commented 5 years ago

Anyone know some method to disable the animations using the react-reveal?

YuriBrunetto commented 5 years ago

Hey!

I also wanted to disable the animations on mobile. My workaround for this was to disable the animation directly in CSS, like so:

/* disable react-reveal's animations */
.react-reveal {
  @media (max-width: 959px) {
    animation: none !important;
    opacity: 1 !important;
  }
}
cmdalbem commented 4 years ago

would be good to have native support for this kind of thing. This workaround doesn't work for when using the cascade option, for instance:

(notice the weird letters on the heading due to the span splitting that cascade does)

image