To integrate GSAP’s ScrollTrigger and TextPlugin in Webflow, you need to load the libraries and trigger animations using Webflow's Embed component.
https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.jshttps://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/ScrollTrigger.min.jshttps://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/TextPlugin.min.js
.headline-text.
<script> tag with your GSAP code. Example:
<script>
gsap.registerPlugin(ScrollTrigger, TextPlugin);
gsap.to(".headline-text", {
scrollTrigger: {
trigger: ".headline-text",
start: "top 80%",
toggleActions: "play none none none"
},
duration: 2,
text: "Webflow + GSAP is powerful!",
ease: "power2.out"
});
</script>
set() or custom styles (e.g., opacity: 0).
To use GSAP ScrollTrigger and TextPlugin in Webflow, load the required CDNs in Project Settings, target your Webflow elements using class/ID selectors, and add your GSAP script in an Embed block using the correct registerPlugin() and gsap.to() methods. All animations must be test-run on the published site.