Jump to content


Responsive GSAP Menu Reveal

Moderator Tag

Recommended Posts

Hi everybody,

I try to make tween menu responsive but got lost. ?

I use watchmedia and addListener to change width of menu panel but my script obviously does not work properly when a) resizing the window b) resizing window and clicking menu button.

Is there a good soul that could help me to fix it? Your ideas are welcome.

Thanks a lot.



See the Pen Jgbvde by jordanboza (@jordanboza) on CodePen

Link to comment
Share on other sites

Hi @Jiri,


I see your post has a lot of views but no answers yet. That's probably because you have so much going on in the demo. Simplified demos make it much easier to troubleshoot. Getting into media queries and responsive layouts is a bit beyond the support we offer around here. We do try to keep the focus on GSAP support.


That being said, I think this thread can help.

You'll see that thread has a lot of good info and links to other responsive threads. I'd pay particular attention to @OSUblake's demo in that thread with the blue and red squares. It's a nice and simple example to get you started. It's always best to start small and build up.


Hopefully that points you in the right direction.


Happy tweening.



  • Like 2
Link to comment
Share on other sites

Hi @PointC,

I simplified the pen and thanks for help.


Link to comment
Share on other sites

hey @Jiri,


Thanks for the reduce case.

In addition to the perfect recommendations of @PointC here is the hint that you can excellently animate a clipPath using GreenSock.


Together with a matchMediaList it could look like this:


See the Pen NQWdEP by mikeK (@mikeK) on CodePen


Happy tweening ...




  • Like 3
Link to comment
Share on other sites

Hello @mikel,


thanks for your good hint and your pen.

I just have one more question. Will that GSAP animated clipPath be played in all main browsers?

Thanks for advise.




Link to comment
Share on other sites

Hey @Jiri,


If you like a lookalike - a fake of a clipPath ...


See the Pen LwyVdY by mikeK (@mikeK) on CodePen


Happy forking ...




  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.