As a reminder, web development (front-end) mainly consists of 3 languages:
- HTML: The structural elements (Image, Heading, Paragraph, Link, etc...)
- CSS: The styles (colors, typography, sizes, etc...)
- JavaScript: The behaviors (Animations, actions, etc)
And often... Learning JavaScript can be intimidating. That's why in this article I will;
- Introduce you to GSAP, a library of pre-designed code (with "Plugins") to integrate and use JavaScript more easily on your sites
- Additionally, share my 3 favorite resources for learning how to use the GSAP (GreenSock) library
Ready to get started?
1. GSAP
A picture is worth a thousand words?
1.1 What is GSAP?
๐ก GSAP is a JavaScript code library that works on all browsers and allows you to animate nearly anything on the web.
The CORE library (although comprehensive) remains lightweight, as many animations are added via Plugins to extend its initial capabilities.
1.2 Why use GSAP for creating animations on the web?
This library is becoming increasingly popular as it is not only "easier" to use than writing raw JS code, but also offers better overall performance:
- Performance: GSAP animations are known for being smooth and fast. Two critical factors for user experience when visiting your site.
- Flexibility: GSAP can animate any property on the web: CSS, attributes, SVG, etc...
- Compatibility: GSAP handles browser compatibility issues, ensuring that animations work well on Google Chrome, Safari, and Firefox, for instance.
- Support and Community: The GSAP teams and its community have created numerous resources to help and share advice. This makes the library accessible and understandable to a wider audience (including your clients, for example!)
- Ease of integration: GSAP provides a system of "plugins" to facilitate advanced animation integration
(Bonus) Regular updates: The GSAP teams keep the library up-to-date with the latest web trends and recommendations. The tool is thus in a constant state of evolution!
That said, you might now want to see what a GSAP animation looks like on a website?
1.3 Examples of sites with GSAP animations
I believe the best way for you to see the possibilities is simply to take a look for yourself!
On the GSAP website, in the Showcase section, you will find some projects showcasing sites that have used the GSAP library for animation.
Discover the GSAP Showcase โ
1.4 GSAP Pricing
GSAP is a paid tool that offers a free option.
The freemium offer allows you to do a lot already, especially if you are still in the learning phase! But here are the 4 offers from GSAP:
- GSAP: This is the free offer that includes the main GSAP library and public plugins like ScrollTrigger. (8 Plugins)
- GSAP Plus: For $99/year, this offer is aimed at individuals wanting access to certain additional plugins. (14 Plugins)
- GSAP Premium: For $149/year, (20 Plugins)
- GSAP Business: At $199/year, this plan includes everything in GSAP Premium, and also adds a commercial license for all your projects.
Note: The prices of the PRO (Business) offer are discounted if you have multiple developers in your team.
2. My tips for learning to create animations with GreenSock
A fan of "Learn by Doing", I believe that one of the best ways to learn to create on the web in general is to:
โ Try to do it
โ Reread the documentation or ask an AI, or look at a template
โ Try to do it again
โ Repeat until you understand
I will therefore present you my "tool stack" and the method that I recommend for learning to create animations using GSAP.
๐ก Itโs advisable to have a basic understanding of HTML and CSS beforehand.
2.1 Webflow: Visual Development Platform (low-code)
Webflow is a visual development platform (low-code). With its WYSIWYG interface allowing you to visually manipulate HTML/CSS, combined with the ability to add Custom Code, the tool is ideally suited for learning and testing your GSAP animations. Because, once your Webflow project is open, all you need to do is:
- Create your HTML and CSS elements from the Webflow designer
- Integrate your codes into the custom code section of your project and/or pages
- Publish and test the results!
2.2 - Documentation and resources from GSAP.com
One of the major strengths of the tool, in my opinion, is the quality of the educational ecosystem they have created around the library.
GSAP has established a resource center that grants you (free) access to a variety of educational content, such as:
Comprehensive documentation:
Everything you need to know about the library, from A to Z.
And resources to help you learn:
- Installation guides (+ Plugins)
- Videos (GSAP YouTube Channel)
- Templates
- Complete training/courses to use GSAP (created by community members)
In short, an ecosystem conducive to onboarding the tool for the largest audience. Well done!
Check out, for example, the free resources on the GSAP.com site.
Bonus: Webflow x GSAP Synergy
If you are a Webflow user, the GSAP teams have thought of you!
Discover the documentation specially designed for Webflow integration โ
2.3 - Chat-GPT (AI)
The 3rd tool in the learning stack: Chat-GPT AI as a pedagogical assistant.
Using Chat GPT as a pedagogical assistant is something I have been recommending for several months, especially for those venturing into JavaScript. The method is "quite simple" and basic: do you have a question or is something not working? Simply present your case to Chat-GPT, detailing your need and what you wish to accomplish. Be as specific as possible and donโt hesitate to include all elements you consider relevant. Then, wait for the AI's response. If your description is detailed enough, it is very likely that the AI will help you troubleshoot your bug or integration error.
Moreover, with the recent update to Chat-GPT-4, you can now ask the AI to explore a web page. This new feature can be extremely useful if youโre looking to understand a specific behavior on a web page that you are using as a reference.
Bonus: Slater.app (For Webflow)
If you want to work or learn to create animations with GSAP utilizing the synergy of Webflow x GSAP + AI, Slater is certainly a good idea.
With the ability to integrate Custom Code (without the 10k character limit) and the chat GPT AI directly integrated into your Webflow interface, I definitely recommend checking it out...
Benefits of using Slater to integrate GSAP on Webflow:
- Rapid code iteration (no need to publish your project to see if the code works: just Ctrl/CmD+S > F5!)
- Integrated AI support
- More visual interface
3. More community resources
And if GSAP x Webflow interests you, and you want to go further, here are some resources from community creators that I invite you to follow:
- WebBae YouTube Channel (๐บ๐ธ) โ
- Timothy Ricks YouTube Channel (๐บ๐ธ)โ
- Digidop YouTube Channel (๐ซ๐ท)โ
- Digidop Newsletter (๐บ๐ธ๐ซ๐ท)โโ
- My X (formerly Twitter) account (๐บ๐ธ)โ
Otherwise, let's meet at the next Digidop YouTube video, with the release of a new tutorial on creating a GSAP animation with Webflow!