SlideShare a Scribd company logo
Spice up your site with cool animations using GSAP..pdf
WELCOME
Into the Box 2025: The Future is Dynamic!
GSAP – A wildly robust JavaScript animation library built for professionals
Spice Up Your Site With Cool
Animations Using GSAP
Saeed Bawaney
• Born in Pakistan. Parents moved to the California Bay Area in the 70’s. Lived in Seattle for
25 years. Moved on Houston TX in 2013. Been married for 25 years with 3 kids.
• I love playing guitar. Played in some bands and released some CDs. Completed in guitar
competitions ( when that was a thing ). I also Love MMA. I used to be part of the media
covering UFC events. Lately I joined F3, a free men’s workout based on Fitness, Fellowship,
and Faith.
• I’ve been working with CF for over 20 years and have left my “legacy” all over the place. I got
introduced to ColdBox over 10 years ago and have been a student of modernization ever
since.
Independent Consultant
saeed.bawaney@gmail.com @shreddtech
What is GSAP
• GSAP = GreenSock Animation Platform
• Smooth, high-performance, flexible animations
• Developed by Jack Doyle - Flash/AS in 2008
• GSAP 1.0 released for JavaScript in 2012
• GSAP 3.0 modernized API released in 2019
• Acquired by Webflow in 2024
• Actively maintained & improved
• Free & Club GreenSock (paid) options
• Trusted by major companies
• Framework Agnostic
• npm
npm install gsap
• yarn
yarn add gsap
• CDN
<script src=“https://cdn.jsdelivr.net/npm/gsap@3.12.7/dist/gsap.min.js"></script>
Installation
• GSAP
• The main object with various methods and properties that create and control tweens
and timelines.
• Tween
• Does all the animation work by transitioning values over time.
• Timeline
• A sequencing tool that acts as a container for tweens and other timelines.
• Controls - pause(), restart(), reverse().
• Easing
• Changes the timing and feel of tweens.
Fundamentals
GSAP Tween
• Animate any CSS-related property.
• Can handle anything you throw at it.
• “If in doubt - try it out!”
• Non-animatable properties
• These will be set at the beginning of the tween except for display: ‘none’, which will be set at the end.
• Animatable properties are ones that have a numeric value representation.
GSAP Tween
• Hyphenated CSS properties become camelCase properties.
• “font-size” will be “fontSize”, “border-radius” becomes “borderRadius”
• Transforms
• Order of transforms
1. translation( x, y, z )
2. scale
3. rotationX
4. rotationY
5. skew
6. rotation
• GSAP’s built in aliases for transforms are more performant and cross
browser friendly.
GSAP Tween
GSAP’s main functions for tweens.
**Event callbacks will go in the vars object. ( onComplete, onUpdate, onStart, onReverseComplete,
onInterrupt, or onRepeat ).
GSAP Tween
L e t ’s c o d e !
GSAP Tween
The problem?
• Working with Tweens alone will can be daunting task.
• If a change is desired, delays would need to be adjusted for every tween manually.
• What about when you need to pause, restart, or reverse the sequence?
gsap.to( “.box”, { x : 1000, duration : 1 } );
gsap.to( “.box”, { y : 100, duration : 1, delay : 1 } );
gsap.to( “.box”, { x : 0, duration : 1, delay : 2 } );
gsap.to( “.box”, { y : 0, duration : 1, delay : 3 } );
v a r t l = g s a p . t i m e l i n e ( { r e p e a t : 1 , r e p e a t D e l a y : 1 } ) ;
t l . t o ( “ . b o x ” , { x : 1 0 0 0 , d u r a t i o n : 1 } )
. t o ( “ . b o x ” , { y : 1 0 0 , d u r a t i o n : 1 } )
. t o ( “ . b o x ” , { x : 0 , d u r a t i o n : 1 } )
. t o ( “ . b o x ” , { y : 0 , d u r a t i o n : 1 } ) ;
t l . p a u s e ( ) ;
t l . r e s u m e ( ) ;
t l . r e v e r s e ( ) ;
t l . r e s t a r t ( ) ;
GSAP Timeline
Timelines - a sequencing tool.
• Adding tweens to a timeline will allow them to play in order one after the other.
• Access to pause(), resume(), restart(), and reverse() methods for the entire sequence.
GSAP Tween
L e t ’s c o d e !
g s a p . t i m e l i n e ( ) . a d d L a b e l ( “ s c e n e I n t r o ” , 0 ) ;
Labels
Labels are great a way to mark important parts of your timeline sequence.
v a r t l = g s a p . t i m e l i n e ( ) ;
t l . a d d L a b e l ( “ s c e n e I n t r o ” , 0 ) ;
t l . a d d L a b e l ( “ s c e n e O n e ” , 5 ) ;
t l . a d d L a b e l ( “ s c e n e Tw o ” , 1 2 ) ;
t l . a d d L a b e l ( “ s c e n e C r e d i t s ” , 1 8 ) ;
c o n s o l e . l o g ( t l . l a b e l s . s c e n e Tw o ) / / 1 2
GSAP Timeline
g s a p . t i m e l i n e ( ) . t o ( [ s e l e c t o r ] , [ v a r s ] , [ p o s i t i o n ] ) ;
The Position parameter
• Position values:
• Number = places tween at this many seconds from the beginning of timeline.
• Label = places tween at the beginning of the label ( { “SceneTwo”: 12 } ).
• “<“ = places tween at the beginning of the previous animation/tween.
• “>“ = places tween at the end of the previous animation/tween.
t l . t o ( “ . b o x ” , { x : 1 0 0 0 , d u r a t i o n : 1 } )
. t o ( “ . b o x ” , { y : 1 0 0 , d u r a t i o n : 1 } , “ 3 ” ) / / 3 s e c o n d s f r o m b e g i n n i n g o f t i m e l i n e .
. t o ( “ . b o x ” , { x : 0 , d u r a t i o n : 1 } , “ < 1 ” ) / / 1 s e c o n d a f t e r t h e s t a r t o f t h e p r e v i o u s t w e e n .
. t o ( “ . b o x ” , { y : 0 , d u r a t i o n : 1 } , “ > - . 3 ” ) ; / / . 3 s e c o n d s b e f o r e t h e e n d o f t h e p r e v i o u s t w e e n .
. t o ( “ . b o x ” , { y : 0 , d u r a t i o n : 1 } , “ s c e n e Tw o + = 2 ” ) ; / / 2 s e c o n d s a f t e r t h e s t a r t o f t h e “ s c e n e Tw o ” l a b e l .
GSAP Timeline
GSAP Tween
Let’s code!
A plugin adds extra capabilities to GSAP’s core. This keeps GSAP’s core
relatively small and lets you use them as you need them.
Free Plugins:
GSAP Plugins
Draggable
Easel
Flip
MotionPath
Observer
Pixi
ScrollTo
ScrollTrigger
Text
Club GSAP Plugins:
DrawSVG
Physics2D
PhysicsProps
ScrambleText
GSDevTools
Inertia
MorphSVG
MotionPathHelper
ScrollSmoother
SplitText
Thank You!
The Future of Modern Development Starts Here, with you! 🚀

More Related Content

PDF
Constructs and techniques and their implementation in different languages
PDF
Ember js meetup treviso liquid-fire
KEY
Parallel Computing in R
PDF
Spring scala - Sneaking Scala into your corporation
PDF
JavaFX, because you're worth it
PDF
機械学習モデルの判断根拠の説明
PPTX
Chapter ii(coding)
PDF
Basics in algorithms and data structure
Constructs and techniques and their implementation in different languages
Ember js meetup treviso liquid-fire
Parallel Computing in R
Spring scala - Sneaking Scala into your corporation
JavaFX, because you're worth it
機械学習モデルの判断根拠の説明
Chapter ii(coding)
Basics in algorithms and data structure

Similar to Spice up your site with cool animations using GSAP..pdf (20)

PDF
Ensuring High Availability for Real-time Analytics featuring Boxed Ice / Serv...
PDF
Swift for tensorflow
PDF
Win-Win Search: Dual-Agent Stochastic Game in Session Search (SIGIR 2014)
PDF
Word2vec in Theory Practice with TensorFlow
PDF
Elasticsearch at EyeEm
PDF
Music as data
PDF
Introduction to Compiler Development
PDF
Rob Sullivan at Heroku's Waza 2013: Your Database -- A Story of Indifference
PDF
Thu bernstein key_warp_speed
PDF
New Android Languages
PDF
Data Manipulation Using R (& dplyr)
PDF
UNIX SHELL IN DBA EVERYDAY
PDF
UNIX SHELL IN DBA EVERYDAY
PDF
Abstract machines for great good
PDF
Coscup
PDF
A Scala Corrections Library
ODP
Clojure made simple - Lightning talk
PDF
Writing (Meteor) Code With Style
PDF
Crunching data with go: Tips, tricks, use-cases
PDF
MongoDB: Optimising for Performance, Scale & Analytics
Ensuring High Availability for Real-time Analytics featuring Boxed Ice / Serv...
Swift for tensorflow
Win-Win Search: Dual-Agent Stochastic Game in Session Search (SIGIR 2014)
Word2vec in Theory Practice with TensorFlow
Elasticsearch at EyeEm
Music as data
Introduction to Compiler Development
Rob Sullivan at Heroku's Waza 2013: Your Database -- A Story of Indifference
Thu bernstein key_warp_speed
New Android Languages
Data Manipulation Using R (& dplyr)
UNIX SHELL IN DBA EVERYDAY
UNIX SHELL IN DBA EVERYDAY
Abstract machines for great good
Coscup
A Scala Corrections Library
Clojure made simple - Lightning talk
Writing (Meteor) Code With Style
Crunching data with go: Tips, tricks, use-cases
MongoDB: Optimising for Performance, Scale & Analytics
Ad

More from Ortus Solutions, Corp (20)

PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
PDF
June Webinar: BoxLang-Dynamic-AWS-Lambda
PDF
BoxLang-Dynamic-AWS-Lambda by Luis Majano.pdf
PDF
What's-New-with-BoxLang-Brad Wood.pptx.pdf
PDF
Getting Started with BoxLang - CFCamp 2025.pdf
PDF
CFCamp2025 - Keynote Day 1 led by Luis Majano.pdf
PDF
What's New with BoxLang Led by Brad Wood.pdf
PDF
Vector Databases and the BoxLangCFML Developer.pdf
PDF
Using cbSSO in a ColdBox App Led by Jacob Beers.pdf
PDF
Use JSON to Slash Your Database Performance.pdf
PDF
Portable CI wGitLab and Github led by Gavin Pickin.pdf
PDF
Tame the Mesh An intro to cross-platform tracing and troubleshooting.pdf
PDF
Supercharging CommandBox with Let's Encrypt.pdf
PDF
Passkeys and cbSecurity Led by Eric Peterson.pdf
PDF
Legacy Code Nightmares , Hellscapes, and Lessons Learned.pdf
PDF
Integrating the OpenAI API in Your Coldfusion Apps.pdf
PDF
Hidden Gems in FusionReactor for BoxLang, ACF, and Lucee Users.pdf
PDF
Geting-started with BoxLang Led By Raymon Camden.pdf
PDF
From Zero to CRUD with ORM - Led by Annette Liskey.pdf
PDF
Customize your Runtime Creating your first BoxLang Module.pdf
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
June Webinar: BoxLang-Dynamic-AWS-Lambda
BoxLang-Dynamic-AWS-Lambda by Luis Majano.pdf
What's-New-with-BoxLang-Brad Wood.pptx.pdf
Getting Started with BoxLang - CFCamp 2025.pdf
CFCamp2025 - Keynote Day 1 led by Luis Majano.pdf
What's New with BoxLang Led by Brad Wood.pdf
Vector Databases and the BoxLangCFML Developer.pdf
Using cbSSO in a ColdBox App Led by Jacob Beers.pdf
Use JSON to Slash Your Database Performance.pdf
Portable CI wGitLab and Github led by Gavin Pickin.pdf
Tame the Mesh An intro to cross-platform tracing and troubleshooting.pdf
Supercharging CommandBox with Let's Encrypt.pdf
Passkeys and cbSecurity Led by Eric Peterson.pdf
Legacy Code Nightmares , Hellscapes, and Lessons Learned.pdf
Integrating the OpenAI API in Your Coldfusion Apps.pdf
Hidden Gems in FusionReactor for BoxLang, ACF, and Lucee Users.pdf
Geting-started with BoxLang Led By Raymon Camden.pdf
From Zero to CRUD with ORM - Led by Annette Liskey.pdf
Customize your Runtime Creating your first BoxLang Module.pdf
Ad

Recently uploaded (20)

PPTX
Computer Software and OS of computer science of grade 11.pptx
DOCX
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
PDF
Cost to Outsource Software Development in 2025
PPTX
Monitoring Stack: Grafana, Loki & Promtail
PDF
17 Powerful Integrations Your Next-Gen MLM Software Needs
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
AutoCAD Professional Crack 2025 With License Key
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
PDF
iTop VPN Free 5.6.0.5262 Crack latest version 2025
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
PPTX
Reimagine Home Health with the Power of Agentic AI​
Computer Software and OS of computer science of grade 11.pptx
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
Cost to Outsource Software Development in 2025
Monitoring Stack: Grafana, Loki & Promtail
17 Powerful Integrations Your Next-Gen MLM Software Needs
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
How to Choose the Right IT Partner for Your Business in Malaysia
AutoCAD Professional Crack 2025 With License Key
Advanced SystemCare Ultimate Crack + Portable (2025)
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Oracle Fusion HCM Cloud Demo for Beginners
iTop VPN Free 5.6.0.5262 Crack latest version 2025
Design an Analysis of Algorithms II-SECS-1021-03
Design an Analysis of Algorithms I-SECS-1021-03
Designing Intelligence for the Shop Floor.pdf
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
Digital Systems & Binary Numbers (comprehensive )
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
Reimagine Home Health with the Power of Agentic AI​

Spice up your site with cool animations using GSAP..pdf

  • 2. WELCOME Into the Box 2025: The Future is Dynamic!
  • 3. GSAP – A wildly robust JavaScript animation library built for professionals Spice Up Your Site With Cool Animations Using GSAP
  • 4. Saeed Bawaney • Born in Pakistan. Parents moved to the California Bay Area in the 70’s. Lived in Seattle for 25 years. Moved on Houston TX in 2013. Been married for 25 years with 3 kids. • I love playing guitar. Played in some bands and released some CDs. Completed in guitar competitions ( when that was a thing ). I also Love MMA. I used to be part of the media covering UFC events. Lately I joined F3, a free men’s workout based on Fitness, Fellowship, and Faith. • I’ve been working with CF for over 20 years and have left my “legacy” all over the place. I got introduced to ColdBox over 10 years ago and have been a student of modernization ever since. Independent Consultant [email protected] @shreddtech
  • 5. What is GSAP • GSAP = GreenSock Animation Platform • Smooth, high-performance, flexible animations • Developed by Jack Doyle - Flash/AS in 2008 • GSAP 1.0 released for JavaScript in 2012 • GSAP 3.0 modernized API released in 2019 • Acquired by Webflow in 2024 • Actively maintained & improved • Free & Club GreenSock (paid) options • Trusted by major companies • Framework Agnostic
  • 6. • npm npm install gsap • yarn yarn add gsap • CDN <script src=“https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script> Installation
  • 7. • GSAP • The main object with various methods and properties that create and control tweens and timelines. • Tween • Does all the animation work by transitioning values over time. • Timeline • A sequencing tool that acts as a container for tweens and other timelines. • Controls - pause(), restart(), reverse(). • Easing • Changes the timing and feel of tweens. Fundamentals
  • 8. GSAP Tween • Animate any CSS-related property. • Can handle anything you throw at it. • “If in doubt - try it out!” • Non-animatable properties • These will be set at the beginning of the tween except for display: ‘none’, which will be set at the end. • Animatable properties are ones that have a numeric value representation.
  • 9. GSAP Tween • Hyphenated CSS properties become camelCase properties. • “font-size” will be “fontSize”, “border-radius” becomes “borderRadius” • Transforms • Order of transforms 1. translation( x, y, z ) 2. scale 3. rotationX 4. rotationY 5. skew 6. rotation • GSAP’s built in aliases for transforms are more performant and cross browser friendly.
  • 10. GSAP Tween GSAP’s main functions for tweens. **Event callbacks will go in the vars object. ( onComplete, onUpdate, onStart, onReverseComplete, onInterrupt, or onRepeat ).
  • 11. GSAP Tween L e t ’s c o d e !
  • 12. GSAP Tween The problem? • Working with Tweens alone will can be daunting task. • If a change is desired, delays would need to be adjusted for every tween manually. • What about when you need to pause, restart, or reverse the sequence? gsap.to( “.box”, { x : 1000, duration : 1 } ); gsap.to( “.box”, { y : 100, duration : 1, delay : 1 } ); gsap.to( “.box”, { x : 0, duration : 1, delay : 2 } ); gsap.to( “.box”, { y : 0, duration : 1, delay : 3 } );
  • 13. v a r t l = g s a p . t i m e l i n e ( { r e p e a t : 1 , r e p e a t D e l a y : 1 } ) ; t l . t o ( “ . b o x ” , { x : 1 0 0 0 , d u r a t i o n : 1 } ) . t o ( “ . b o x ” , { y : 1 0 0 , d u r a t i o n : 1 } ) . t o ( “ . b o x ” , { x : 0 , d u r a t i o n : 1 } ) . t o ( “ . b o x ” , { y : 0 , d u r a t i o n : 1 } ) ; t l . p a u s e ( ) ; t l . r e s u m e ( ) ; t l . r e v e r s e ( ) ; t l . r e s t a r t ( ) ; GSAP Timeline Timelines - a sequencing tool. • Adding tweens to a timeline will allow them to play in order one after the other. • Access to pause(), resume(), restart(), and reverse() methods for the entire sequence.
  • 14. GSAP Tween L e t ’s c o d e !
  • 15. g s a p . t i m e l i n e ( ) . a d d L a b e l ( “ s c e n e I n t r o ” , 0 ) ; Labels Labels are great a way to mark important parts of your timeline sequence. v a r t l = g s a p . t i m e l i n e ( ) ; t l . a d d L a b e l ( “ s c e n e I n t r o ” , 0 ) ; t l . a d d L a b e l ( “ s c e n e O n e ” , 5 ) ; t l . a d d L a b e l ( “ s c e n e Tw o ” , 1 2 ) ; t l . a d d L a b e l ( “ s c e n e C r e d i t s ” , 1 8 ) ; c o n s o l e . l o g ( t l . l a b e l s . s c e n e Tw o ) / / 1 2 GSAP Timeline
  • 16. g s a p . t i m e l i n e ( ) . t o ( [ s e l e c t o r ] , [ v a r s ] , [ p o s i t i o n ] ) ; The Position parameter • Position values: • Number = places tween at this many seconds from the beginning of timeline. • Label = places tween at the beginning of the label ( { “SceneTwo”: 12 } ). • “<“ = places tween at the beginning of the previous animation/tween. • “>“ = places tween at the end of the previous animation/tween. t l . t o ( “ . b o x ” , { x : 1 0 0 0 , d u r a t i o n : 1 } ) . t o ( “ . b o x ” , { y : 1 0 0 , d u r a t i o n : 1 } , “ 3 ” ) / / 3 s e c o n d s f r o m b e g i n n i n g o f t i m e l i n e . . t o ( “ . b o x ” , { x : 0 , d u r a t i o n : 1 } , “ < 1 ” ) / / 1 s e c o n d a f t e r t h e s t a r t o f t h e p r e v i o u s t w e e n . . t o ( “ . b o x ” , { y : 0 , d u r a t i o n : 1 } , “ > - . 3 ” ) ; / / . 3 s e c o n d s b e f o r e t h e e n d o f t h e p r e v i o u s t w e e n . . t o ( “ . b o x ” , { y : 0 , d u r a t i o n : 1 } , “ s c e n e Tw o + = 2 ” ) ; / / 2 s e c o n d s a f t e r t h e s t a r t o f t h e “ s c e n e Tw o ” l a b e l . GSAP Timeline
  • 18. A plugin adds extra capabilities to GSAP’s core. This keeps GSAP’s core relatively small and lets you use them as you need them. Free Plugins: GSAP Plugins Draggable Easel Flip MotionPath Observer Pixi ScrollTo ScrollTrigger Text Club GSAP Plugins: DrawSVG Physics2D PhysicsProps ScrambleText GSDevTools Inertia MorphSVG MotionPathHelper ScrollSmoother SplitText
  • 19. Thank You! The Future of Modern Development Starts Here, with you! 🚀