What problem does it solve?
GSAP core enables precise, high-performance web animations by giving a compact API for tweens, timelines, and CSS transforms, avoiding layout thrashing and ensuring smooth transitions.
Core Features & Use Cases
- Core Tween Methods: gsap.to(), gsap.from(), gsap.fromTo(), gsap.set() and camelCase property usage for predictable styling.
- Transforms & CSS Properties: use transform aliases for performant, consistent animations on DOM/SVG elements, including autoAlpha for accessible fades.
- Responsive & Sequencing: utilize gsap.matchMedia() for responsive and prefers-reduced-motion scenarios; coordinate multiple animations with timelines.
- Practical Use Case: create a simple intro animation for a card, then sequence a follow-up parallax effect on scroll with ScrollTrigger (related concept).
- Performance Best Practices: prefer transforms over layout properties.
Quick Start
Create a basic GSAP tween on a DOM element to move it 100px to the right over one second.