New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

gsap

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
G

gsap

GSAP is a framework-agnostic JavaScript animation library that turns developers into animation superheroes. Build high-performance animations that work in **every** major browser. Animate CSS, SVG, canvas, React, Vue, WebGL, colors, strings, motion paths,

3.12.7
latest
100

Supply Chain Security

100

Vulnerability

100

Quality

88

Maintenance

100

License

Misc. License Issues

License

(Experimental) A package's licensing information has fine-grained problems.

Found 1 instance in 1 package

Version published
Weekly downloads
646K
2.29%
Maintainers
0
Weekly downloads
 
Created
Issues
8

What is gsap?

GSAP (GreenSock Animation Platform) is a powerful JavaScript library for creating high-performance animations that work in all major browsers. It is widely used for animating web elements, SVGs, and more, providing a rich set of features for developers to create complex animations with ease.

What are gsap's main functionalities?

Basic Tweening

This feature allows you to animate any property of an element over a specified duration. In this example, the element with the class 'element' will move 100 pixels to the right over 1 second.

gsap.to('.element', { duration: 1, x: 100 });

Timeline Animations

Timelines allow you to sequence multiple animations. In this example, 'element1' will move 100 pixels to the right, and then 'element2' will move 100 pixels down, each over 1 second.

const tl = gsap.timeline();
tl.to('.element1', { duration: 1, x: 100 })
  .to('.element2', { duration: 1, y: 100 });

Stagger Animations

Staggering allows you to animate multiple elements with a delay between each start. In this example, each element with the class 'elements' will move 100 pixels to the right, starting 0.2 seconds after the previous one.

gsap.to('.elements', { duration: 1, x: 100, stagger: 0.2 });

ScrollTrigger

ScrollTrigger allows you to create animations that are triggered by scrolling. In this example, the element with the class 'element' will move 100 pixels to the right when it enters the viewport.

gsap.registerPlugin(ScrollTrigger);
gsap.to('.element', { scrollTrigger: '.element', x: 100 });

Other packages similar to gsap

FAQs

Package last updated on 15 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts