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

The animation onClick or onHover event does not works #84

Open
DomV-cloud opened this issue Sep 14, 2023 · 2 comments
Open

The animation onClick or onHover event does not works #84

DomV-cloud opened this issue Sep 14, 2023 · 2 comments

Comments

@DomV-cloud
Copy link

DomV-cloud commented Sep 14, 2023

I would like to use UseAnimation and icons as well. But animations are played only for non-click or non-hover icons (like activity etc..)

I followed steps for installations.

import React from "react";
import UseAnimations from "react-useanimations";
import github from 'react-useanimations/lib/github';

const App = () => (
  <UseAnimations animation={github} size={56} />
);

So my code looks like this:

import UseAnimations from "react-useanimations";
import menu2 from 'react-useanimations/lib/menu2';

export default function MobileMenu() {
  return (
   
            <UseAnimations
                animation={menu2}
                size={56}
                strokeColor="#B1986B"
                onClick={() => {
                   console.log("icon is clicked");
                  }}
            />
    
  )
}

@GoodboyBadvibes
Copy link

I have the same issue too, I'm not sure it ever works 😂

@KalinduGunathilake
Copy link

Same issue here. Autoplay works when the page loads, but doesn't get animated onHover or onClick like on their website. Anyone who knows how to manually trigger the animations onClick and onHover?

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

3 participants