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.
Using the Core Library & Free plugins
Open your site in the Designer
Open Page settings for the page where you’d like to add your code
In the UI find the Before
</body>tag section under Custom code
Into that section, add the following...
First we include the GSAP library with a script tag
If you want to include plugins, add another script tag with the plugin you need.
Then inside another script tag you can add your custom animation code!
// This tween will rotate an element with a class of .my-element
And that's the lot! Remember that any custom scripts will only appear on the published site.
Using Club Plugins.
The Club Plugins do not have CDN links, as this would mean that anyone could use them!
Most people self-host these files. Unfortunately, Webflow hasn't made this easy as you can't upload JS files through their platform. If you have an external hosting provider you can upload the files there and then reference them with a script tag. If you don't, you can copy-paste the code from the Club Plugin file into Webflow's custom code field, this may not work for all plugins as the field has a character limit.
For people on all webflow tiers - a somewhat hacky work-around is to save your external JS file as a .txt file which can then be uploaded to the Webflow asset panel. Once it's uploaded to the asset panel you can get the direct link that can then be used as a script src in page or project settings.
Here are some further discussions from the Webflow community.