AI TOOLS

Share a GSAP animation as a link

AI tools animate landing pages and demos with GSAP. Load GSAP from a CDN in one HTML file, put the script after the elements it moves, then upload it and send the link.

4 min read·

Ask Claude or ChatGPT for an animated hero, a scroll effect or a product demo and the code often uses GSAP. It plays in the chat preview. Saved and opened somewhere else, the same code can sit still: elements in place, nothing moving.

GSAP runs in the browser with no server, so one HTML file is enough. Load it from a CDN, keep the animation code after the elements it targets, and upload the file.

The file

Put the markup and CSS the AI tool wrote in an HTML file. At the end of the body, after every element the animation touches, add:

  • ✓<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  • ✓For scroll effects, also <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/ScrollTrigger.min.js"></script>
  • ✓Then a <script> with the animation code, starting with gsap.registerPlugin(ScrollTrigger); when it uses scroll effects.
  • ✓Tested in Chrome with GSAP 3.15.0: a timeline moved a box 200px and rotated it 90 degrees, and a ScrollTrigger fade-in further down the page went from opacity 0 to 1 when scrolled into view.

Frozen, warning "GSAP target not found"

If the animation script sits in the head, it runs before the body exists. GSAP finds nothing to animate, logs "GSAP target .box not found" in the console and gives up; the page shows the elements in their starting places.

Move the script to the end of the body, or wrap the code in document.addEventListener('DOMContentLoaded', () => { ... }).

Frozen, error "Failed to resolve module specifier"

Code written for a build tool starts with import { gsap } from "gsap". A browser does not know where "gsap" lives, so the module stops on its first line with "Failed to resolve module specifier "gsap"" in the console.

Two fixes, both tested. Delete the import lines and load GSAP with the script tags above; gsap and ScrollTrigger become globals the code can use as written. Or keep the imports and add an import map in the head: <script type="importmap">{ "imports": { "gsap": "https://esm.sh/gsap@3.15.0", "gsap/": "https://esm.sh/gsap@3.15.0/" } }</script>. With it, import { ScrollTrigger } from "gsap/ScrollTrigger" also works.

Upload it and send the link

Drag the file onto the FileShare Pro dashboard and copy the link. Viewers need no account and see the animation play as it does for you.

Turn on comments and reviewers can pin notes to a spot on the page after typing a name. When you change the timing or the easing, upload the new file over the old one; the link stays the same: updating a shared link without changing it.

Related: sharing a Lottie animation as a link, sharing a Tailwind page as a link and why a page that works in chat breaks when hosted.

Frequently asked

Do I need a GSAP license?

GSAP is free to use, including its plugins such as ScrollTrigger. Check gsap.com for the current terms.

Is registerPlugin required?

With the script tags, ScrollTrigger worked in our test without it. With imports it is needed, and it does no harm either way, so keep gsap.registerPlugin(ScrollTrigger) in the code.

Is it free?

Yes. The free plan hosts up to 50 files of up to 100 MB each, with view counts and comments included. Password-protected links are on Pro.

Got a page to share?

Drop the file, copy the link — live in seconds, free plan included.

Start sharing free