GSAP to Webflow Guide
Flowboard GSAP Mapping Guide
Write GSAP in a mapping-friendly way so Flowboard can convert more of your animations into native Webflow interactions.
Best-results checklist
- Use simple class selectors for animated targets.
- Give triggers clear classes or IDs.
- Prefer
gsap.from(...)andgsap.fromTo(...). - For color/background tweens, use
fromToor set a start state withgsap.set(...)first. - Keep tween values literal and explicit.
- Keep timelines linear and easy to read.
- Use simple page-load, click, hover, or basic
ScrollTriggertriggers.
What maps well right now
GSAP patterns
gsap.from,gsap.to,gsap.fromTogsap.setfor initial states- Simple chained timelines
- Timeline controls:
play,reverse,restart - Direct click and hover handlers
- Simple
ScrollTriggerand simpleSplitText
Targets and properties
- Direct selectors like
.hero-titleor#hero - Simple descendants like
.hero .title - Common properties:
opacity,x/y,scale,rotation,backgroundColor,color,borderColor,fill,stroke
Copy-ready examples
Page load entrance
gsap.from(".hero-title", {
y: 32,
opacity: 0,
duration: 0.7,
ease: "power3.out"
});
gsap.from(".hero-copy", {
y: 24,
opacity: 0,
duration: 0.6,
delay: 0.1,
ease: "power3.out"
});Click-triggered panel
const panelTl = gsap.timeline({ paused: true, reversed: true });
panelTl.fromTo(
".pricing-drawer",
{ yPercent: 12, opacity: 0 },
{ yPercent: 0, opacity: 1, duration: 0.35, ease: "power3.out" }
);
document.querySelector(".pricing-toggle").addEventListener("click", () => {
if (panelTl.reversed()) {
panelTl.play();
} else {
panelTl.reverse();
}
});ScrollTrigger with explicit states
gsap.fromTo(
".feature-card",
{ y: 40, opacity: 0, backgroundColor: "#f3f4f6" },
{
y: 0,
opacity: 1,
backgroundColor: "#ffffff",
duration: 0.8,
ease: "power3.out",
scrollTrigger: {
trigger: ".feature-card",
start: "top 80%",
end: "bottom 40%",
scrub: false,
once: true
}
}
);Patterns to avoid
- Unsupported plugins like
MotionPathPlugin,Flip,Draggable, orMorphSVGPlugin - Advanced
ScrollTriggeroptions like pinning, snap, callbacks, or custom scrollers - Complex selector patterns and pseudo-element targeting
- Heavy callback logic and state-machine timeline control
- Event handlers that mix mapping tweens with app/DOM side effects
Safe structure for mixed JS
Keep the mapped GSAP tween isolated, then add extra runtime logic in separate lines. This usually gives cleaner native mapping.
gsap.from(".stats-card", { y: 20, opacity: 0, duration: 0.5 });
document.querySelector(".stats-card").addEventListener("click", () => {
console.log("Card clicked");
});How to tell if mapping worked
- Check conversion report mapped GSAP counts.
- Review GSAP warnings in the conversion report.
- If mapping is partial, supported tween steps become native while unsupported logic stays as supplemental JS.
If results are weak, simplify in this order:
- Use direct class selectors.
- Replace style
to(...)tweens withfromTo(...). - Remove unsupported plugins/callbacks.
- Flatten timeline/event logic.
- Retry one tween at a time, then add complexity back.
Prompt for AI-generated GSAP
Generate GSAP that is compatible with Flowboard's HTML-to-Webflow converter. Rules: - Use vanilla HTML class selectors only. - Prefer direct class selectors like .hero-title or simple descendants like .hero .title. - Use gsap.from, gsap.to, gsap.fromTo, gsap.set, or simple gsap.timeline chains only. - Keep all tween values literal and explicit. - For color/background changes, use gsap.fromTo or gsap.set before gsap.to. - Allowed triggers: page load, simple click, simple hover, basic ScrollTrigger. - Do not use unsupported plugins, callbacks, complex selectors, or DOM mutation side effects.