Atri-Labs / atrilabs-engine

🧘‍♂️ Open-source no-code & code web app builder
https://atrilabs.com
GNU General Public License v3.0
4.13k stars 179 forks source link

Lift card on hover using framer motion #780

Open cruxcode opened 1 year ago

cruxcode commented 1 year ago

Create a component that has the animation as shown in the clip attached with this description. You will have to learn two things -

  1. How to create a component? - Find details here
  2. What is the best way to create an animation component that is reusable? - Find details here

The React component signature

const LiftCard = React.forwardRef<HTMLDivElement, {
  styles: React.CSSProperties,
  custom: {
    src: string; // src of the background image
    initialTop: number; // initial value of the top CSS property
    finalTop: number: // value of the top CSS property on hover
  }
}
>((props, ref)=>{
 ...
});

Steps

  1. Create a new project - follow docs here
  2. Create the custom component - follow this article
  3. Add a file called LiftCard.md in made-with-atri folder and write your GitHub repo name in the file. Make sure the GitHub repo is public.

https://user-images.githubusercontent.com/30747788/236547242-5f4e483b-c1e4-4221-8b60-5b4fb8c87a58.mov

sumitshinde-84 commented 1 year ago

I would like to work on this issue. Currently, I am working on a project where I am using GSAP and Framer Motion.

cruxcode commented 1 year ago

@sumitshinde-84 your project looks awesome. Please go ahead and work on this issue. You can join our Slack channel if you need help understanding our framework.

Also, I would love to know which animations are done using GSAP in your project.

sumitshinde-84 commented 1 year ago

Thank you for your kind words and encouragement! I'm glad to hear that you find my project impressive. Yes, almost all of the animations in my project were done using GSAP. I will definitely join your Slack channel if I need any help understanding your framework. Thank you for the invitation!