Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elements on load not animating #13

Open
Sulley93 opened this issue Sep 21, 2022 · 9 comments
Open

Elements on load not animating #13

Sulley93 opened this issue Sep 21, 2022 · 9 comments

Comments

@Sulley93
Copy link

Elements located in viewport on page load not animating untill scroll even with animatePreScroll = true

@victoprincipe
Copy link

Try add more Offset to your Component, like this:

<AnimationOnScroll
    animateIn="animate__fadeInRight"
    animateOnce
    animatePreScroll 
    offset={50} // Default value is 150
  >
    <span>Test</span>
</AnimationOnScroll>

@Azteker
Copy link

Azteker commented Dec 16, 2022

Try add more Offset to your Component, like this:

<AnimationOnScroll
    animateIn="animate__fadeInRight"
    animateOnce
    animatePreScroll 
    offset={50} // Default value is 150
  >
    <span>Test</span>
</AnimationOnScroll>

Tried in react 18, and get the same not animation issue

@victoprincipe
Copy link

Can you give more details about your problem?

@Azteker
Copy link

Azteker commented Dec 16, 2022

Can you give more details about your problem?

I just created a new project with create-react-app, and replace App.tsx returned content with

<AnimationOnScroll 
        animateIn="animate__shakeY"
        animateOut="animate__bounceOutRight"
        animatePreScroll 
        offset={50}
      >
    <h2>Some Text</h2>
</AnimationOnScroll>

That is all, and I do not see any animation when load the page

@tjay27
Copy link

tjay27 commented Dec 22, 2022

@victoprincipe facing the same issue, on page load, animateIn doesn't fire up.

@kdhanushbhat
Copy link

I too am having the same issue.

@Semako123
Copy link

Same here

@Semako123
Copy link

I was able to fix mine by putting off the React Strict Mode, try it out

@CRIMSON-CORP
Copy link

What is suggest to do is to add the animate CSS animation class names directly to the element instead of using Animation on scroll on that element, then you can use Animation on Scroll on other elements that need to be scrolled to, worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants