Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Sequences multiple animations using a timeline.
# gsap/demo/timeline.html
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.12.2/dist/gsap.min.js"></script>
</head>
<body>
<div id="box1" style="width:50px;height:50px;background:red;margin:10px;"></div>
<div id="box2" style="width:50px;height:50px;background:blue;margin:10px;"></div>
<script>
const tl = gsap.timeline({ repeat: -1, yoyo: true });
tl.to('#box1', { x: 200, duration: 1 })
.to('#box2', { y: 200, duration: 1 }, '<');
</script>
</body>
</html>GSAP (GreenSock Animation Platform) is a high-performance JavaScript library for creating complex animations in the browser. It provides an easy-to-use, robust API for animating DOM elements, SVGs, canvas objects, and even WebGL/Three.js content, with precise control over timing, easing, and sequencing.
Origin & Creator
GSAP was created by Jack Doyle (GreenSock) in 2008 and has since become the industry standard for JavaScript-based animations, maintained by a professional team with open-source contributions.
Industrial Note
GSAP is widely used in interactive marketing, high-end UI/UX animations, banner ads, website transitions, data visualization animations, game UIs, and creative coding projects that demand precise, performant, and complex motion.