Using the GSAP Library for Animation
GSAP is an open source scripted library that focuses solely on fast animation using JavaScript and provides cross-platform consistency support. It supports animation on a wide range of element types, such as Scalar Vector Graphics (SVG), React components, canvas, and so on.
GSAP is flexible, easy to install, and will adjust to any configuration given, from CSS properties or SVG attributes to a numeric value for rendering an object into a canvas.
The core library is a suite of different tools, divided into core and others, such as plugins, easing tools, and utilities.
Installing GSAP
Installing GSAP is straightforward using npm install
or yarn add
:
yarn add gsap #or npm install gsap
After installation, you should see a success output similar to that shown in the following screenshot:
Now that we have GSAP installed, we'll look at basic tweens in GSAP...