Jump to content
GreenSock

Webflow x GSAP


| GreenSock
13959

Webflow is great! It's a super user-friendly no-code platform that allows you to build at the speed of thought... But sometimes, a little code can be the thing that takes your project to the next level.

It seems like the Webflow community agrees. Take a look at all of these amazing Webflow sites that are utilising GSAP! If you're a Webflow whizz and you want to give animating with GSAP a go, we've got your back. here are a selection of useful links and tips to get you going.

Installation

  1. Open your site in the Designer
  2. Open Page settings for the page where you’d like to add your code
  3. Add the following script and GSAP tween to the Before </body> tag section under Custom code
  4. Save your changes

bodytag.png

// First we include the GSAP library with a script tag
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.11.3/gsap.min.js"></script>

<script>
// Then inside another script tag you can add your custom animation code!
// This tween will rotate an element with a class of .my-element
gsap.to('.my-element', {
  rotation: 360,
  duration: 2,
  ease: 'bounce.out'
})

</script>

And that's the lot! Remember that any custom scripts will only appear on the published site.

More information on custom code from Webflow university

Some extra webflow & custom code tips...

 

Getting started with GSAP X Webflow

 

Web Bae - YouTube Tutorials

More great videos from Web Bae

 

If you get stuck, pop over to our friendly forums! Good luck and happy tweening!

 

Get an all-access pass to premium plugins, offers, and more!

Join the Club

We love seeing what you build with GSAP. Don't forget to let us know when you launch something cool.

- Team GreenSock



User Feedback

Recommended Comments

when I entered my custom code it gives me this:

"Custom code is not validated. Incorrect code may cause issues with the published page."Screenshot2023-05-03at1_25_46PM.thumb.png.384799f62b47a61680c2a18912fd6f4b.png

Link to comment
Share on other sites

Rodrigo

Posted

@Mohamad Tohme, maybe you have a syntax error somewhere that Webflow is picking up. Unfortunately the small code snippet you posted in that image doesn't tell us exactly what could be the issue.

 

Maybe it would be better if you review your code and if you keep having issues head to the GSAP Forums and start a thread there:

https://greensock.com/forums/forum/11-gsap/

 

Happy Tweening!

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

×