Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

266
Views
use gsap scrollTrigger in react

I am trying to imply some animations in an image while scrolling , the image will grow while scrolling down and return to normal when scrolling up . The reference : codepen. This is my react code :

 <ArticleWrapper ref={ref}>
        <img id='grow' className='image' src={Img} alt='Image' />
</ArticleWrapper>

I have tried to implement this but it didnt work when I scroll :

  const ref = useRef(null);
 useEffect(() => {
    const element = ref.current;
    scrollTrigger: {
    trigger: "#grow",
    scrub: 1.5,
    start: "top center",
    end: "+=400",
    ease: "power1.out"
  },
      {
       duration: 1,
  scale: 1
      }
    );
  }, []);

Any idea how to do that ?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!