dbramwell / react-animate-on-scroll

React component to provide animations when the user scrolls
618 stars 72 forks source link

Components not visible #59

Open jmebradl23 opened 4 years ago

jmebradl23 commented 4 years ago

Attempted to do a simple test:

import React from 'react';
import ScrollAnimation from 'react-animate-on-scroll';
import "animate.css/animate.min.css";

const App = () => {
    return (
        <div>
            <ScrollAnimation animateIn='fadeIn'>
                <h1>animateIn</h1>
            </ScrollAnimation>
        </div>
    )
  }

export default App;

But the component isn't showing up on the page on scroll. Element is in the DOM but animation is not getting triggered. Only thing I see in the console is: "[HMR] Waiting for update signal from WDS..."

Any ideas?

ZAkamboh commented 4 years ago

Same issue with me

CamzBarber commented 4 years ago

Try change the animateIn to 'animateanimated animatefadeIn', like so: <ScrollAnimation animateIn='animate__animated animate__fadeIn'>

williamgravel commented 4 years ago

As of animate.css v4.0.0, CSS classes for animations are all prefixed with animate__ to avoid class clashes. Simply replace animateIn="fadeInLeft" with animateIn="animate__fadeInLeft" to fix this issue.

quentin-pla commented 4 years ago

Try to add "#root" as parent selector like this : <ScrollAnimation animateIn='animate__animated animate__fadeInUp' scrollableParentSelector='#root'> <h1>Hello</h1> </ScrollAnimation>