Hi, Cassie. Yeah, His demo has rotation and x, but it has nothing to do here. Below is a demo in pure html/javascript/css. It works finely as expected. However, when I write it in React, it doesn't work.
https://codepen.io/asterisk37n/pen/ZEvOwBm
Hi. I use GSAP v3 with NextJS. I found that a gsap.to(duration, {"clip-path": polygon(...)} doesn't work well with ReactJS, which works on pure html/javascript/css environment (A working demo in pure html/javascript/css can be found in an answer by OSUblake in my previous question[1]. It has also other movements.)
In my attached demo, the top left corner moves from the left to right. However, :before element should expand from the top to the bottom. i.e. the bottom line should move from the top to the bottom.
Is this a bug or I'm using GSAP and React wrongly? I attached reproducible codepen in ReactJS.
Thank you in advance and sorry for continuous submissions.
[1]
I found related three articles that can help understanding using ReactJS and GSAP together.
https://greensock.com/docs/v3/GSAP/UtilityMethods/selector()
Hi. I have a question about how to target :before element and run a tween on it, and need help to run my codepen demo.
I found some people have shown a demo targeting ".class:before"[1][2][3][4], and came across a website[5] that is apparently using GSAP and targeting :before element. However, I also found other people said it is impossible[6], and my codepen demo doesn't work. Can anyone fix my codepen to target :before element?
I'm using the latest version of GSAP ("gsap": "^3.9.1") with nextjs for my production environment. Thank you in advance.
[1]
[2]
[3]
[4]
[5] https://giginc.co.jp/
[6]