GSAP + Glaze + BricksBuilder
You’ll first build a solid mental model of how animations work, then learn GSAP properly , and finally learn how to use Glaze efficiently for everyday work—without losing the ability to create advanced custom animations later.
- GSAP + Glaze Course Outline for WordPress + BricksBuilder 🚀
- Cheat Sheet for GSAP + Glaze + WordPress + BricksBuilder 🧩
- 1. Introduction: How This Course Works
- 1.1 Why this course focuses on GSAP first and Glaze second
- 1.2 What you will be able to do after finishing the course
- 2. Animation Fundamentals Before GSAP
- 2.1 What web animation actually is
- 2.2 The Difference Between CSS Animation, CSS Transition, JavaScript Animation, and GSAP Animation
- 2.3 Core visual concepts
- 2.4 The Most Important CSS Concepts You Need First
- 2.5 The most important JavaScript concepts you need first 🚀
- 2.6 How Animation Can Fail Because of Layout, Not Because of GSAP 🧱✨
- 2.7 Common beginner misunderstandings and how to avoid them
- 3. Setting Up GSAP in WordPress and BricksBuilder
GSAP + Glaze Course Outline for WordPress + BricksBuilder 🚀
Below is a structured course table of contents designed for your situation:
- GSAP as the core foundation
- Glaze as the practical simplification layer
- tailored to WordPress and BricksBuilder
- friendly for someone with limited JavaScript and CSS experience
The idea is: you’ll first build a solid mental model of how animations work, then learn GSAP properly, and finally learn how to use Glaze efficiently for everyday work—without losing the ability to create advanced custom animations later.
Course Table of Contents
-
Introduction: How This Course Works
- Why this course focuses on GSAP first and Glaze second
- What you will be able to do after finishing the course
- Who this course is for
- How to use this course together with me step by step
- Recommended learning order and practice method
- What tools you need:
- WordPress
- BricksBuilder
- Browser developer tools
- A code snippet/plugin workflow
- Optional local development environment
-
Animation Fundamentals Before GSAP
- What web animation actually is
- The difference between:
- CSS animation
- CSS transition
- JavaScript animation
- GSAP animation
- Core visual concepts:
- Position
- Scale
- Rotation
- Opacity
- Timing
- Delay
- Sequencing
- The most important CSS concepts you need first:
- Classes
- IDs
- Nesting and hierarchy
- Display types
- Positioning basics
- Overflow
- Transform
- Transform origin
- Z-index
- The most important JavaScript concepts you need first:
- What JavaScript does in the browser
- Variables in simple terms
- Functions in simple terms
- Selecting elements from the page
- Events in simple terms
- Running code after the page is loaded
- How animation can fail because of layout, not because of GSAP
- Common beginner misunderstandings and how to avoid them
-
Setting Up GSAP in WordPress and BricksBuilder
- What GSAP is and why developers love it
- When to use GSAP instead of CSS-only animation
- Different ways to add GSAP to a WordPress site:
- CDN
- Local files
- Plugin/snippet-based inclusion
- Theme or child-theme integration
- Best setup methods for BricksBuilder users
- Where to place custom JavaScript in BricksBuilder
- Where to place custom CSS in BricksBuilder
- How to safely test animations without breaking a live site
- Loading order:
- GSAP core
- Plugins
- Your own scripts
- How to verify GSAP is loaded correctly
- Creating your first “GSAP is working” test animation
- Troubleshooting setup issues in WordPress and BricksBuilder
-
Your First Steps in GSAP
- Understanding the three most important methods:
gsap.to()gsap.from()gsap.fromTo()
- Understanding targets:
- Class selectors
- ID selectors
- Multiple elements
- Specific nested elements
- Understanding properties:
xyopacityscalerotationdurationdelayease
- Writing your first practical animations:
- Fade in
- Slide up
- Slide left/right
- Zoom in
- Rotate in
- How
from()can create “entrance animation” behavior - When to use
to()vsfrom()vsfromTo() - The role of default CSS states
- How to read GSAP code without feeling overwhelmed
- Practice exercises for basic animation creation
- Understanding the three most important methods:
-
Understanding Transforms and Motion Clearly
- Why transforms are the foundation of smooth animation
- Difference between layout properties and transform properties
- Understanding:
translatexandyscalerotateskew
- Transform origin explained visually
- Combining multiple transform properties in one animation
- Why some elements animate “strangely”
- How parent containers affect animated children
- Practical BricksBuilder examples using transforms
- Exercises focused only on motion and transforms
-
Timing, Easing, and Animation Feel
- What makes an animation feel smooth, elegant, fast, or awkward
- Duration explained in a practical way
- Delay explained in a practical way
- Easing explained simply
- Common ease types and when to use them
- Why linear motion often feels unnatural
- Matching animation feel to website style:
- Corporate
- Premium
- Creative
- Minimal
- Playful
- How to avoid over-animating a page
- Exercises comparing different easing and duration choices
-
Animating Multiple Elements
- Selecting a group of elements
- How GSAP handles multiple targets
- Stagger animations explained clearly
- Common patterns:
- Cards entering one after another
- List items fading upward
- Icons popping in sequence
- Gallery elements revealing progressively
- Controlling order and rhythm
- Grid and loop-like animation thinking
- Avoiding common issues with dynamic content
- Practical BricksBuilder examples with repeated elements
- Exercises for staggered animations
-
Timelines: The Real Power of GSAP ⭐
- What a timeline is
- Why timelines are better than many separate animations
- Creating your first timeline
- Adding steps to a timeline
- Sequencing animations properly
- Running animations at the same time vs one after another
- Position parameters explained simply
- Overlapping animations without confusion
- Reusable timeline thinking
- Building a hero section animation with a timeline
- Building a card reveal sequence with a timeline
- Common beginner timeline mistakes
- Exercises focused on sequencing
-
ScrollTrigger: Animations on Scroll
- What ScrollTrigger is and why it matters
- How to load and register ScrollTrigger
- Trigger, start, end, and scrub explained simply
- Difference between:
- Scroll-triggered animation
- Scroll-linked animation
- Typical use cases:
- Fade in on scroll
- Slide in on scroll
- Section reveal
- Pinned storytelling sections
- Progress-based motion
- Using markers for debugging
- How viewport position really works
- Building your first ScrollTrigger animation
- Building scroll reveal animations for Bricks sections
- Building image and text animations triggered on scroll
- Understanding
scrub - Understanding
pin - Understanding
toggleActions - Common ScrollTrigger mistakes
- Performance and mobile considerations
- Exercises for scroll-based interactions
-
Working Safely Inside WordPress and BricksBuilder
- How Bricks structures the DOM
- Choosing stable selectors in Bricks
- Using classes instead of overly specific selectors
- Avoiding selector problems when templates repeat
- Animating elements inside:
- Sections
- Containers
- Blocks
- Query loops
- Popups
- Sliders/tabs/accordions
- Dealing with content that appears later
- Page-specific vs global animation scripts
- Organizing code snippets cleanly
- Preventing conflicts with optimization and caching plugins
- How to debug when an element exists visually but GSAP cannot target it
- Safe workflow for staging and production
-
Responsive Animation
- Why animations should change across screen sizes
- What works on desktop but not on mobile
- Adjusting movement distances for small screens
- Adjusting timing for mobile
- Hiding or reducing non-essential motion
- GSAP approaches for responsive behavior
- ScrollTrigger considerations on mobile devices
- Building animations that still feel elegant on tablet and phone
- Exercises for responsive adaptation
-
Accessibility and User Experience
- Why accessibility matters in animation
- Understanding reduced motion preferences
- Respecting
prefers-reduced-motion - When animation improves UX
- When animation harms UX
- Avoiding motion sickness and distraction
- Keeping animations fast, meaningful, and readable
- Making animation support content instead of overpowering it
- Accessibility checklist for every project
-
Debugging GSAP Like a Beginner-Friendly Developer
- A simple debugging mindset
- Common reasons animations do not run:
- GSAP not loaded
- Wrong selector
- Script running too early
- Element hidden or not rendered yet
- CSS conflict
- ScrollTrigger setup issue
- Using browser developer tools without fear
- Logging and testing in small steps
- Isolating animation code from layout problems
- Debugging timeline issues
- Debugging ScrollTrigger issues
- Debugging in Bricks-specific environments
- Creating a repeatable troubleshooting checklist
-
Performance and Best Practices
- What makes animations feel slow
- Why transforms and opacity are usually best
- Avoiding layout thrashing and expensive properties
- Reducing animation overload on a page
- Performance considerations for scroll animations
- Performance considerations for mobile devices
- Lazy loading, dynamic content, and refresh behavior
- Organizing animations for maintainability
- Reusing patterns instead of rewriting everything
- Practical performance checklist for WordPress projects
-
Intermediate GSAP Concepts
- Callbacks explained simply
- Repeats and yoyo
- Defaults in timelines
- Labels in timelines
- Controlling playback:
- Play
- Pause
- Reverse
- Restart
- Setting states with
gsap.set() - Relative values
- Function-based values
- Basic utility methods worth knowing
- Building slightly smarter animations without advanced JavaScript
-
Advanced GSAP Possibilities You Should Understand Conceptually
- Why this chapter is about understanding, not memorizing
- Advanced possibilities overview:
- Complex timelines
- Scroll storytelling
- Parallax systems
- Menu animations
- Page transition ideas
- Interactive hover systems
- Mouse-follow effects
- SVG animation
- Text splitting animation concepts
- State-based animation systems
- Which advanced ideas are realistic inside BricksBuilder
- Which advanced ideas may require stronger JavaScript skills
- How to grow from “simple user” to “custom animation builder”
-
Introduction to Glaze: Why It Exists
- What Glaze is
- How Glaze relates to GSAP
- When Glaze is a better choice than raw GSAP
- When raw GSAP is a better choice than Glaze
- The mental model of “declarative” animation
- How Glaze can help non-JavaScript-heavy users
- The limitations of simplification tools
- Why learning GSAP first makes Glaze much more powerful
-
Setting Up Glaze in WordPress and BricksBuilder
- How Glaze is added to a project
- Required dependencies and loading order
- How Glaze works with GSAP and ScrollTrigger
- Where Glaze configuration or attributes live
- Typical setup inside BricksBuilder
- Testing whether Glaze is working
- Troubleshooting Glaze setup issues
-
Your First Animations with Glaze
- The basic Glaze syntax and mental model
- Creating simple entrance animations
- Creating fade, slide, and scale effects
- Applying animations through attributes/classes
- Repeating the same animation pattern across many elements
- Practical BricksBuilder examples using Glaze
- Comparing the same animation in:
- Raw GSAP
- Glaze
- Exercises for simple Glaze usage
-
Scroll Animations with Glaze
- How Glaze simplifies ScrollTrigger patterns
- Creating scroll reveal effects
- Creating stagger-on-scroll effects
- Trigger settings in Glaze
- Debugging scroll-based Glaze setups
- Practical reveal systems for Bricks sections
- Comparing Glaze scroll setup with raw GSAP ScrollTrigger
-
Choosing Between GSAP and Glaze
- A practical decision framework
- When to use Glaze:
- Fast implementation
- Reusable simple effects
- Lower-code workflows
- When to use GSAP:
- Complex sequencing
- Advanced control
- Interactive behavior
- Highly custom motion systems
- Hybrid workflows:
- Glaze for simple reveal effects
- GSAP for hero sections and complex components
- Project planning examples
- How professionals often mix abstraction and custom code
-
Reusable Animation Systems for Real Projects
- Creating a consistent motion style for a website
- Building a small animation library for yourself
- Naming conventions for reusable classes
- Reusing reveal patterns across multiple pages
- Building “animation recipes” for common sections:
- Hero
- Feature cards
- Testimonials
- Pricing tables
- FAQ
- CTA sections
- Footer reveals
- Combining Bricks classes, GSAP, and Glaze systematically
- Maintaining consistency across client sites
-
Real-World Project Modules
- Project 1: Simple business website animation system
- Project 2: Premium agency-style landing page
- Project 3: Scroll-based storytelling homepage
- Project 4: Animated cards and content reveal system
- Project 5: Interactive header and mobile menu
- Project 6: Query loop animation patterns in Bricks
- Project 7: WooCommerce-friendly subtle animations
- For each project module:
- Planning
- Structure
- Animation goals
- GSAP version
- Glaze version where appropriate
- Performance checks
- Accessibility checks
-
Common Patterns You Will Use Again and Again
- Fade up reveal
- Fade in with slight delay
- Staggered card entrance
- Hero text sequence
- Image mask reveal concept
- Counter or number emphasis concept
- Hover emphasis animations
- Section transition feel
- Pinned section concept
- Before/after comparison thinking
- Reusable code and Glaze pattern library
-
Mini JavaScript and CSS Support Modules
- JavaScript essentials specifically for animation work
- CSS essentials specifically for animation work
- Selectors cheat sheet
- Positioning cheat sheet
- Transform cheat sheet
- Easing and timing cheat sheet
- ScrollTrigger cheat sheet
- BricksBuilder-specific implementation cheat sheet
- Glaze syntax cheat sheet
- “How to read code without panic” support lesson
-
Workflow, Planning, and Creative Decision-Making
- How to decide what should animate and what should not
- Designing animation with purpose
- Starting with low motion and increasing only if needed
- Planning animation before writing code
- Creating animation hierarchy on a page
- Matching animation to branding and audience
- Knowing when restraint is more professional
- Turning inspiration into practical implementation
-
Final Integration: From Beginner to Independent Use
- How to approach a new project from scratch
- Choosing your workflow:
- Mostly Glaze
- Mostly GSAP
- Hybrid
- Building your own starter animation toolkit
- How to keep improving after the course
- How to use documentation effectively
- How to ask better questions when stuck
- Personal roadmap:
- Beginner stage
- Confident implementer stage
- Advanced custom creator stage
-
Appendices
- Glossary of animation terms
- GSAP terminology glossary
- ScrollTrigger terminology glossary
- Glaze terminology glossary
- BricksBuilder implementation notes
- WordPress-specific troubleshooting notes
- Common selector patterns for Bricks users
- Recommended animation defaults for professional websites
- Resource list:
- Official docs
- Practice inspiration sources
- Debugging tools
- Performance tools
Suggested Learning Path for You 🎯
If I may recommend a practical path, I would suggest this order:
-
Modules 1–6
- Build your foundation
- Learn just enough CSS/JS to not feel lost
- Create first basic GSAP animations
-
Modules 7–10
- Learn stagger, timelines, and ScrollTrigger
- Start thinking in real website sections
- Understand Bricks-specific implementation
-
Modules 11–14
- Learn responsive, accessibility, debugging, and performance
- This is where you become reliable, not just creative
-
Modules 15–16
- Expand into more capable GSAP usage
- Understand what is possible, even if you do not use all of it yet
-
Modules 17–21
- Learn Glaze
- Compare it directly with raw GSAP
- Develop judgment about when to use which tool
-
Modules 22–28
- Build systems
- Practice real-world projects
- Become independent in planning and execution
Best Way to Build This Course Together 🤝
A good workflow would be:
- You choose a chapter from the table of contents.
- I write the full lesson for that chapter.
- If you want, I can include:
- Beginner explanations
- WordPress + BricksBuilder examples
- GSAP code samples
- Glaze equivalents
- Exercises
- Cheat sheets
- Then we move chapter by chapter until the course is complete.
My Recommendation for the First Lesson
We should probably start with:
- Module 1: Introduction: How This Course Works
or, if you want to begin immediately with useful foundations:
- Module 2: Animation Fundamentals Before GSAP
or, if you want to get quickly into practical use:
- Module 3: Setting Up GSAP in WordPress and BricksBuilder
If you want, I can next turn this outline into either:
- a more detailed curriculum version with learning goals per chapter, or
- the full content for Module 1, or
- the full content for Module 2.
Cheat Sheet for GSAP + Glaze + WordPress + BricksBuilder 🧩
This cheat sheet is designed as your practical quick-reference companion for future lessons. It is not yet the full course, but a structured reference you can keep beside you while building animations.
It assumes:
- You use WordPress
- You build with BricksBuilder
- You want to learn GSAP properly
- You also want to benefit from Glaze for simpler workflows
- Your JavaScript and CSS knowledge is still developing
1. Big Picture: What Each Tool Does
-
CSS
- Controls styling and layout
- Can do basic transitions and animations
- Is often enough for simple hover effects
- Becomes limited for complex sequences and scroll behavior
-
JavaScript
- Lets you control what happens in the browser
- Can respond to events such as:
- click
- scroll
- page load
- Makes animation logic possible
-
GSAP
- A JavaScript animation library
- Makes animations smoother and easier to control
- Excellent for:
- sequencing
- stagger effects
- scroll animations
- advanced motion systems
- reusable animation logic
-
ScrollTrigger
- A GSAP plugin
- Connects animation behavior to scroll position
- Used for:
- reveal-on-scroll
- scrub effects
- pinned sections
- storytelling layouts
-
Glaze
- A simplification layer for animation workflows
- Helps you declare animations more quickly
- Useful when you want:
- less custom JavaScript
- faster implementation
- repeatable simple effects
- Less ideal when you need:
- very custom logic
- complex sequencing
- heavy interactivity
2. Core Mental Model of GSAP 🧠
Think of GSAP like this:
-
Target
- What element should animate?
-
Property
- What should change?
- Examples:
xyopacityscalerotation
-
Value
- How much should it change?
-
Timing
- How long should it take?
- Should it start later?
- Should it ease smoothly?
Basic pattern:
gsap.to(".box", {
x: 100,
opacity: 1,
duration: 1,
ease: "power2.out"
});
Meaning:
- Animate
.box - Move it
100pixels on the x-axis - Make it fully visible
- Take
1second - Use a smooth easing curve
3. The 3 Most Important GSAP Methods
3.1 gsap.to()
Use when you want to animate from the current state to a new state.
gsap.to(".box", {
y: -50,
opacity: 1,
duration: 1
});
Meaning:
The element starts from however it currently looks and animates to these values.
3.2 gsap.from()
Use when you want to animate from a starting state into the natural/current state.
gsap.from(".box", {
y: 50,
opacity: 0,
duration: 1
});
Meaning:
The element appears to come in from below and fade in.
This is extremely common for entrance animations.
3.3 gsap.fromTo()
Use when you want to define both start and end values explicitly.
gsap.fromTo(".box",
{
y: 50,
opacity: 0
},
{
y: 0,
opacity: 1,
duration: 1
}
);
Use this when:
- You want maximum clarity
- You do not want to depend on the element’s existing CSS state
- You want more predictable results
4. Most Important GSAP Properties
4.1 Movement
x- Moves left or right
- Positive = right
- Negative = left
x: 100
y- Moves up or down
- Positive = down
- Negative = up
y: -50
4.2 Visibility
opacity0= invisible1= fully visible
opacity: 0
4.3 Size
scale1= normal size0.8= smaller1.2= larger
scale: 0.8
4.4 Rotation
rotation- Rotates in degrees
rotation: 45
4.5 Timing
duration- How long animation takes in seconds
duration: 1.2
delay- Wait before starting
delay: 0.3
ease- Controls animation feel
ease: "power2.out"
5. Most Common Ease Values
Use these often:
-
linear- Constant speed
- Often feels mechanical
-
power1.out- Gentle ease out
- Good for subtle motion
-
power2.out- Very common default feel
- Smooth and professional
-
power3.out- Stronger easing
- Feels more dramatic
-
power2.inOut- Smooth at start and end
- Good for balanced movement
-
back.out- Slight overshoot
- Good for playful emphasis
-
elastic.out- Spring-like
- Use carefully
Simple recommendation:
For many professional websites, start with:
ease: "power2.out"
6. Targets and Selectors
GSAP needs to know which element to animate.
6.1 Common selector types
- Class selector
".card"
- ID selector
"#hero-title"
- Nested selector
".hero .heading"
- Multiple matching elements
".feature-card"
If many elements have that class, GSAP can animate all of them.
6.2 Good selector habits in BricksBuilder ✅
- Prefer classes over IDs in most cases
- Use stable custom classes you control
- Avoid overly long selectors when possible
- If content repeats, make sure your selector strategy still makes sense
Good examples:
".js-fade-up"
".hero-title"
".feature-card"
".testimonial-item"
Better to use purposeful classes such as:
.js-reveal.js-stagger-item.js-hero-title
This makes your code easier to reuse.
7. gsap.set() for Initial States
Use gsap.set() when you want to assign values immediately without animation.
gsap.set(".box", {
opacity: 0,
y: 40
});
Then animate later:
gsap.to(".box", {
opacity: 1,
y: 0,
duration: 1
});
This is useful for:
- predictable starting states
- avoiding flashes of visible content
- cleaner animation setup
8. Stagger Animations
A stagger means multiple elements animate one after another.
gsap.from(".card", {
y: 30,
opacity: 0,
duration: 0.8,
stagger: 0.15
});
Meaning:
- Each
.cardanimates in - A
0.15second gap exists between starts
Very useful for:
- card grids
- lists
- icon rows
- gallery items
- repeated Bricks query loop items
9. Timelines: The Most Important Intermediate Concept ⭐
If you learn only one big GSAP concept beyond basics, learn timelines.
9.1 Why timelines matter
Without timelines, you often write many separate animations.
With timelines, you can control a sequence in one place.
9.2 Basic timeline example
let tl = gsap.timeline();
tl.from(".hero-badge", {
y: 20,
opacity: 0,
duration: 0.6
})
.from(".hero-title", {
y: 40,
opacity: 0,
duration: 0.8
})
.from(".hero-text", {
y: 20,
opacity: 0,
duration: 0.6
})
.from(".hero-button", {
y: 20,
opacity: 0,
duration: 0.5
});
This creates a clean sequence.
9.3 Overlapping timeline animations
let tl = gsap.timeline();
tl.from(".hero-title", {
y: 40,
opacity: 0,
duration: 0.8
})
.from(".hero-text", {
y: 20,
opacity: 0,
duration: 0.6
}, "-=0.3");
"-=0.3" means:
- Start this animation
0.3seconds before the previous one ends - This creates overlap
- Overlap often feels more polished
10. ScrollTrigger Cheat Sheet 🖱️
10.1 Basic setup
gsap.registerPlugin(ScrollTrigger);
Then:
gsap.from(".section-title", {
y: 40,
opacity: 0,
duration: 0.8,
scrollTrigger: {
trigger: ".section-title",
start: "top 80%"
}
});
10.2 Most important ScrollTrigger options
-
trigger- Which element controls when the animation starts
-
start- When the trigger activates
Example:
start: "top 80%"
Meaning:
-
when the top of the trigger reaches
80%down the viewport -
end- Where the trigger effect ends
- More relevant for scrub or pin setups
-
scrub- Links animation progress to scroll progress
scrub: true
pin- Keeps an element fixed during scroll for a section of time
pin: true
markers- Shows visual debug markers on screen
markers: true
Very useful when learning.
toggleActions- Controls what happens on enter/leave/re-enter/back
Common example:
toggleActions: "play none none none"
10.3 Simple reveal on scroll
gsap.from(".reveal", {
y: 40,
opacity: 0,
duration: 0.8,
ease: "power2.out",
scrollTrigger: {
trigger: ".reveal",
start: "top 85%"
}
});
10.4 Stagger reveal on scroll
gsap.from(".card", {
y: 30,
opacity: 0,
duration: 0.8,
stagger: 0.15,
scrollTrigger: {
trigger: ".cards-wrapper",
start: "top 80%"
}
});
10.5 Scrub example
gsap.to(".image", {
y: -100,
ease: "none",
scrollTrigger: {
trigger: ".section",
start: "top bottom",
end: "bottom top",
scrub: true
}
});
This creates a scroll-linked effect.
11. Common Animation Patterns You Will Use Often
11.1 Fade in
gsap.from(".item", {
opacity: 0,
duration: 0.8
});
11.2 Fade up
gsap.from(".item", {
y: 30,
opacity: 0,
duration: 0.8,
ease: "power2.out"
});
11.3 Slide in from left
gsap.from(".item", {
x: -60,
opacity: 0,
duration: 0.8
});
11.4 Zoom in
gsap.from(".item", {
scale: 0.85,
opacity: 0,
duration: 0.8
});
11.5 Sequential hero animation
let tl = gsap.timeline();
tl.from(".hero-kicker", {
y: 20,
opacity: 0,
duration: 0.5
})
.from(".hero-title", {
y: 40,
opacity: 0,
duration: 0.8
}, "-=0.2")
.from(".hero-text", {
y: 20,
opacity: 0,
duration: 0.6
}, "-=0.3")
.from(".hero-button", {
y: 20,
opacity: 0,
duration: 0.5
}, "-=0.2");
12. CSS Concepts You Must Know for Animation
You do not need advanced CSS first, but you do need these basics.
12.1 transform
GSAP often animates transforms.
Examples:
translateXtranslateYscalerotate
GSAP simplifies this with properties like:
xyscalerotation
12.2 opacity
Controls visibility.
opacity: 0;
Invisible, but still takes up layout space.
12.3 position
Important values:
-
static- default
-
relative- keeps normal flow
- allows positioned children to reference it
-
absolute- taken out of normal flow
- often used for layered animation elements
-
fixed- fixed to viewport
12.4 overflow
Very important for reveals.
Useful when:
- text slides upward inside a wrapper
- images reveal from inside a frame
- you want to hide animated overflow
12.5 z-index
Controls stacking order.
If animation looks wrong, sometimes the issue is not GSAP but layering.
12.6 display
Common values:
blockinlineinline-blockflexgridnone
Animation can behave differently depending on display type.
13. JavaScript Basics You Need Most
13.1 Variables
let tl = gsap.timeline();
A variable stores something.
13.2 Functions
function runAnimation() {
gsap.from(".box", {
y: 30,
opacity: 0
});
}
A function groups code for reuse.
13.3 Selecting elements
document.querySelector(".box");
document.querySelectorAll(".card");
GSAP often lets you skip this and pass selectors directly.
13.4 Run code after page load
Common pattern:
document.addEventListener("DOMContentLoaded", () => {
gsap.from(".box", {
y: 30,
opacity: 0
});
});
Useful in WordPress/Bricks to avoid running too early.
14. WordPress + BricksBuilder Implementation Cheat Sheet 🧱
14.1 Good places for custom animation code
Depending on your setup, you may place code in:
- Bricks custom code area
- page-level custom code
- theme or child-theme files
- a code snippets plugin
- footer script area
For beginners, a safe custom code area is usually easiest.
14.2 Recommended structure
- Add GSAP library
- Add ScrollTrigger if needed
- Add your own custom script after GSAP
- Give your Bricks elements meaningful classes
14.3 Example HTML class strategy in Bricks
For a hero section, assign classes such as:
.hero-section.hero-title.hero-text.hero-button
Then target them in GSAP.
14.4 Good naming style
Use animation-friendly class names:
.js-fade-up.js-stagger-group.js-stagger-item.js-hero-title
This makes your intent clear.
14.5 Query loop caution
If Bricks repeats items, selectors may target all repeated items.
That is good when intended, but dangerous if you expected only one.
Be careful with:
- repeated cards
- post lists
- product loops
- sliders
15. Debugging Cheat Sheet 🔍
When animation fails, check in this order:
- Is GSAP loaded?
- Open console
- Test:
console.log(gsap);
- Is ScrollTrigger loaded and registered?
- Test:
console.log(ScrollTrigger);
- Does the selector match a real element?
- Test:
console.log(document.querySelector(".my-element"));
-
Is the script running too early?
- Wrap in
DOMContentLoaded
- Wrap in
-
Is CSS preventing the result?
- Hidden parent
overflowdisplay: none- wrong positioning
- transform conflict
-
For scroll animation: is the trigger correct?
- Use
markers: true
- Use
-
Are there JavaScript errors above your GSAP code?
- One earlier error can stop everything
16. Common Beginner Mistakes
-
Using the wrong selector
- You typed
.hero-title - The real class is
.hero_heading
- You typed
-
Trying to animate before the element exists
- Common in builders or dynamic content
-
Confusing
from()andto()from()= animate from values into current stateto()= animate from current state to new values
-
Animating layout properties instead of transforms
- Avoid animating things like:
topleftwidthheight
- Prefer:
xyscaleopacity
- Avoid animating things like:
-
Using too much animation
- A professional website usually needs restraint
-
Not testing mobile
- Motion distance may feel too large on small screens
-
Ignoring reduced motion
- Accessibility matters
17. Performance Cheat Sheet ⚡
Prefer these properties
xyscalerotationopacity
Be careful with these
widthheighttopleft- box-shadow-heavy animation
- filter-heavy animation
General rules
- Keep animations purposeful
- Do not animate everything on a page
- Avoid too many simultaneous scroll effects
- Test on mobile
- Use stagger for elegance instead of chaos
18. Accessibility Cheat Sheet ♿
Respect reduced motion
Basic idea:
- Some users prefer less motion
- Your site should reduce or remove intense animation for them
Conceptually, your animations should:
- avoid large aggressive movement
- avoid constant motion
- avoid distracting flashing behavior
- support content, not fight it
A simple CSS concept you should know:
@media (prefers-reduced-motion: reduce) {
* {
animation: none !important;
transition: none !important;
}
}
Later in the course, we can build the GSAP version of this properly.
19. GSAP Pattern Templates
19.1 Basic entrance animation
gsap.from(".element", {
y: 30,
opacity: 0,
duration: 0.8,
ease: "power2.out"
});
19.2 Scroll reveal template
gsap.from(".element", {
y: 30,
opacity: 0,
duration: 0.8,
ease: "power2.out",
scrollTrigger: {
trigger: ".element",
start: "top 85%",
markers: false
}
});
19.3 Stagger template
gsap.from(".item", {
y: 20,
opacity: 0,
duration: 0.6,
ease: "power2.out",
stagger: 0.12
});
19.4 Hero timeline template
let tl = gsap.timeline();
tl.from(".hero-title", {
y: 40,
opacity: 0,
duration: 0.8,
ease: "power2.out"
})
.from(".hero-text", {
y: 20,
opacity: 0,
duration: 0.6,
ease: "power2.out"
}, "-=0.3")
.from(".hero-button", {
y: 20,
opacity: 0,
duration: 0.5,
ease: "power2.out"
}, "-=0.2");
20. Glaze Cheat Sheet 🌿
Because Glaze setups can vary depending on version and implementation style, I’ll keep this section conceptually accurate and workflow-oriented for now, so you do not learn the wrong syntax too early.
20.1 What Glaze is good for
- Simple reveal effects
- Repeatable animation rules
- Lower-code workflows
- Faster implementation in visual-builder environments
20.2 Glaze mental model
Instead of writing lots of custom GSAP code, you often:
- add attributes or configuration to elements
- declare animation behavior in a simpler way
- let Glaze translate that into GSAP behavior
20.3 Best use cases for Glaze
- fade-up reveals
- simple scroll reveals
- repeated animation classes or attributes
- site-wide animation patterns
- quick implementation in Bricks
20.4 When to switch to raw GSAP instead
Use raw GSAP when you need:
- custom hero timelines
- overlapping multi-step sequences
- advanced ScrollTrigger control
- interactive states
- custom animation logic
- timeline labels and playback control
20.5 Practical rule of thumb
- Simple and repeatable → use Glaze
- Custom and complex → use GSAP
- Mixed project → use both
That hybrid approach is often ideal.
21. “Which Tool Should I Use?” Decision Guide
-
I want a simple fade-up on scroll for many sections
- Best choice: Glaze or simple GSAP
-
I want a premium hero animation with perfect sequence control
- Best choice: GSAP timeline
-
I want cards to enter one after another
- Best choice: GSAP stagger
- Or Glaze if repeated setup is simple enough
-
I want animation tied to scroll progress
- Best choice: GSAP + ScrollTrigger
-
I want low-code convenience
- Best choice: Glaze
-
I want to deeply understand what is happening
- Best choice: learn GSAP first
22. Professional Defaults You Can Reuse
Here are safe defaults that often work well on professional websites:
22.1 Standard fade-up
{
y: 30,
opacity: 0,
duration: 0.8,
ease: "power2.out"
}
22.2 Standard stagger
{
y: 20,
opacity: 0,
duration: 0.6,
ease: "power2.out",
stagger: 0.12
}
22.3 Standard scroll trigger
{
trigger: ".element",
start: "top 85%"
}
22.4 Good motion design advice
- Use small to medium distances
- Use smooth easing
- Keep durations moderate
- Avoid exaggerated movement unless stylistically justified
23. Quick Glossary
-
Target
- The element being animated
-
Tween
- A single GSAP animation
-
Timeline
- A sequence of animations
-
Stagger
- A delayed sequence across multiple elements
-
Ease
- The speed curve of motion
-
Trigger
- The element that controls when a scroll animation starts
-
Scrub
- Scroll directly controls animation progress
-
Pin
- Element stays fixed during part of scroll
-
Transform
- Visual movement/scale/rotation without changing layout flow
-
Opacity
- Visibility level
24. Your Personal Beginner Workflow
When creating an animation, think in this order:
- What element am I animating?
- What should visually change?
- Should this happen on page load or on scroll?
- Do I need one animation or a sequence?
- Can I use a simple repeated pattern?
- If yes, consider Glaze
- Do I need detailed control?
- If yes, use GSAP
- Does it still work well on mobile?
- Is it subtle enough to feel professional?
25. Super Short “Memory Version” 📝
If you remember only a few things, remember these:
- Use
from()for entrance animations - Use
to()for animating to a new state - Use timelines for sequences
- Use ScrollTrigger for scroll behavior
- Use transforms and opacity for best performance
- Use stable classes in Bricks
- Use Glaze for simple repeated patterns
- Use raw GSAP for complex custom motion
- Debug with selectors, load order, and markers
- Subtle animation usually looks more professional
26. Suggested Next Step 🎯
A good next step would be one of these:
-
Create an expanded GSAP-only cheat sheet
- with more code examples
- with beginner explanations line by line
-
Create a BricksBuilder implementation cheat sheet
- exactly where to place scripts
- how to structure classes
- common builder pitfalls
-
Create a Glaze-specific cheat sheet
- focused on practical usage patterns
- focused on simple animations in Bricks
-
Start the actual course with Module 1 or Module 2
If you want, I can next create three separate cheat sheets:
- GSAP Cheat Sheet
- ScrollTrigger Cheat Sheet
- Glaze + BricksBuilder Cheat Sheet
That would probably be the most useful version for real practice.
1. Introduction: How This Course Works
This opening module explains the structure, logic, and learning philosophy of the course. Its purpose is to make sure you understand why the course begins with animation concepts and GSAP fundamentals before moving into easier, more automated workflows with Glaze. Instead of treating animation as a collection of copied effects, this course is designed to help you build a reliable mental model: what animation actually is, how timing and motion influence perception, and how tools like GSAP and Glaze fit into a professional WordPress workflow. 🎯
You will also learn what kind of results you can realistically expect by the end of the course. That includes creating clean entrance animations, scroll-based effects, timeline-driven sequences, and reusable animation patterns in BricksBuilder. At the same time, the module makes clear that the course is beginner-friendly in terms of JavaScript and CSS, but it does not oversimplify the subject. The goal is to help you grow from someone who uses animation to someone who truly understands it.
This module also introduces the practical learning path of the course: first foundations, then setup, then GSAP essentials, then more advanced interactions, and finally Glaze as a productivity layer. In other words, you are not just learning a plugin or syntax—you are building a transferable skill set that can support future web projects well beyond a single page builder. 🚀
1.1 Why this course focuses on GSAP first and Glaze second
This is an important decision in the structure of the course, because it affects how deeply you understand animation, how independent you become, and how far you’ll be able to go later when your projects become more complex. 🎯
The short version is:
- GSAP is the actual animation engine.
- Glaze is a simplification layer built around animation concepts that come from GSAP-like thinking.
- If you understand the core first, then the simplified layer becomes much easier to use correctly.
- If you learn only the simplified layer first, you may be able to create quick effects, but you’ll often hit limits without understanding why something works or breaks.
So the course is intentionally designed to help you become:
- practical quickly,
- confident in real projects,
- and capable of growing from simple effects to advanced animation systems.
The core idea: learn the engine before the shortcut
Think of it like this:
- GSAP is like learning how to drive a car properly:
- You understand steering, braking, speed, traction, timing, and control.
- Glaze is like driving a very comfortable car with helpful automation:
- It makes many things easier.
- It reduces setup.
- It can help you work faster.
- But if the road becomes difficult—rain, hills, tight turns, unusual situations—you benefit enormously from understanding what the car is actually doing.
That is exactly why GSAP comes first.
Glaze is valuable, and we will absolutely use it. But Glaze is most useful when you already understand:
- what an animation is,
- what properties are changing,
- what triggers the animation,
- what timing and easing mean,
- and what to do when something doesn’t behave as expected.
Without that foundation, Glaze can become something you use mechanically rather than something you control intentionally.
GSAP is the real foundation
At the center of this course is the idea that GSAP is the underlying mental model you want to build.
When people say they “use GSAP,” they are usually talking about several important concepts at once:
- Selecting elements
- Animating properties
- Defining duration
- Using easing
- Setting start and end states
- Sequencing multiple animations
- Triggering animations on load, click, hover, scroll, or other events
- Coordinating multiple elements
- Controlling performance
- Debugging timing and state problems
These concepts are not just “GSAP syntax.” They are the language of animation logic.
Glaze may give you a simpler way to declare some of these things, but the underlying questions remain the same:
- What exactly should animate?
- From what state to what state?
- When should it begin?
- How long should it take?
- How should it feel?
- Should elements animate together or one after another?
- Should this happen once, repeatedly, or in response to scroll?
If you learn GSAP first, you will understand these questions as design and logic decisions, not just as settings in a tool.
That matters a lot in WordPress and BricksBuilder projects, because real websites are rarely “perfect demo environments.” They contain:
- dynamic content,
- responsive layouts,
- reusable components,
- CMS-generated structures,
- interactions with other plugins,
- and sometimes inconsistent markup.
A person who only learned the simplified layer may struggle in these situations. A person who understands GSAP fundamentals has a much better chance of adapting.
Why “core first” is especially important for someone with limited JavaScript and CSS experience
Since you mentioned that your JavaScript and CSS skills are not yet very strong, it might seem at first that starting with Glaze would be easier. And in a very short-term sense, that is true: Glaze can help you get results quickly.
However, in the medium and long term, going straight to simplification can actually create more confusion.
Why? Because when you use an abstraction too early, you may skip over the concepts that explain what is happening.
For example, if something animates incorrectly, you need to be able to reason through questions like:
- Is the element being selected correctly?
- Is the element hidden, transformed, clipped, or positioned in a way that affects the animation?
- Is the animation starting from the wrong state?
- Is CSS already applying a transform that the animation is also trying to control?
- Is the trigger firing too early or too late?
- Is the problem caused by layout, timing, easing, responsiveness, or JavaScript execution order?
A beginner who starts with only a simplified layer often sees animation as:
- “I added the settings.”
- “It should work.”
- “It doesn’t work.”
- “I don’t know why.”
But a beginner who learns the GSAP foundation starts to think like this:
- “This element has an initial state.”
- “This property is changing.”
- “This trigger starts the change.”
- “This duration and easing define the feel.”
- “This layout or CSS rule may be interfering.”
That is a much more powerful mindset. 💡
So even though GSAP may look more technical at first, learning it early actually helps reduce fear and confusion later.
Learning GSAP first creates true transferable understanding
Another major reason for this approach is that GSAP knowledge transfers.
If you understand GSAP well, you can apply that knowledge in many places:
- WordPress
- BricksBuilder
- custom code blocks
- HTML/JS projects outside WordPress
- other builders or frameworks
- future animation tools that use similar concepts
But if you learn only Glaze as a project-specific convenience layer, your knowledge may remain more narrow.
This course is not meant to teach you a tool in isolation. It is meant to help you develop an animation skillset.
That skillset includes:
- visual thinking,
- timing intuition,
- understanding of state changes,
- basic DOM awareness,
- basic CSS property awareness,
- and confidence in debugging.
GSAP is the better teacher for those things because it exposes the actual structure of animation more clearly.
Glaze is then introduced as a way to speed up implementation, not as a substitute for understanding.
Glaze is easier to use when GSAP concepts already make sense
One of the biggest practical reasons for this sequence is simple:
Glaze becomes dramatically easier once GSAP concepts are familiar.
When you already understand ideas such as:
x,y,opacity,scale, androtation,- duration,
- easing,
- delay,
- stagger,
- scroll triggers,
- timelines,
- initial versus animated state,
then Glaze starts feeling intuitive rather than mysterious.
You’ll look at a Glaze configuration and mentally translate it into something like:
- “Okay, this is animating opacity and movement.”
- “This is triggered on scroll.”
- “This is starting from a hidden offset state.”
- “This is sequencing multiple items with a stagger.”
- “This is just a simpler way of expressing animation logic I already understand.”
That is the ideal relationship between the two:
- GSAP gives you comprehension
- Glaze gives you convenience
If the order is reversed, you may get convenience without comprehension.
And convenience without comprehension is fragile.
You do not want to become trapped in “copy settings until it works”
A very common problem in visual web development is the “trial-and-error dependency loop”:
- you copy a snippet,
- you tweak values randomly,
- something almost works,
- a new layout breaks it,
- you try more random changes,
- and eventually the animation feels unstable or hard to maintain.
This often happens when someone learns only the outer layer of a system.
By focusing on GSAP first, the course tries to protect you from that trap.
Instead of learning animation as a set of recipes only, you learn:
- what the recipe is doing,
- why each ingredient matters,
- and how to adjust it intentionally.
That means that over time you become less dependent on:
- copied code,
- tutorials you must imitate exactly,
- or plugin-specific presets.
Instead, you become able to say:
- “I want this card to fade in and rise slightly.”
- “I want these items to animate one after another.”
- “I want this section to react to scroll position.”
- “I want this hero animation to feel premium, not generic.”
Then you can decide whether to implement that with:
- pure GSAP,
- Glaze,
- or a mixture of both.
That freedom is one of the biggest goals of the course.
In BricksBuilder and WordPress, real-world complexity arrives quickly
In theory, simple animations are easy. In practice, websites introduce complications very fast.
For example, in BricksBuilder and WordPress, you may run into things like:
- reusable templates,
- loops and dynamic content,
- conditionally rendered sections,
- responsive changes between desktop and mobile,
- elements that load later,
- sticky headers,
- nested containers,
- interactions with sliders, popups, tabs, or accordions,
- and plugins that add their own styles or scripts.
In such environments, the difference between “I know Glaze settings” and “I understand GSAP concepts” becomes very important.
Why?
Because animation is never isolated from layout and behavior. It depends on:
- the DOM structure,
- CSS rules,
- timing,
- events,
- viewport behavior,
- and sometimes page lifecycle issues.
GSAP gives you a direct path to understanding and controlling these situations.
Glaze is still useful in this environment—but usually most useful when:
- the desired effect is relatively standard,
- the project structure is predictable,
- and you already understand what the abstraction is doing underneath.
So the course order reflects the reality of production work, not just the convenience of quick demos.
GSAP teaches animation thinking, not just implementation
A key educational reason for this sequence is that GSAP helps you think in terms of animation design principles.
When you work directly with GSAP concepts, you naturally start noticing things like:
- motion distance
- timing
- easing
- overlap
- sequence
- rhythm
- attention direction
- visual hierarchy
These are not merely technical details. They are part of making a website feel:
- polished,
- intentional,
- readable,
- premium,
- and user-friendly.
For example:
- A large movement may feel dramatic.
- A small movement may feel elegant.
- A fast ease-out may feel snappy.
- A slower reveal may feel luxurious.
- A stagger can guide the eye through content.
- Poorly timed motion can feel distracting or amateur.
GSAP makes these ideas visible because you work with them directly.
Glaze can absolutely help you implement tasteful animation—but GSAP is the better place to learn why one animation feels good and another feels awkward.
That is especially valuable if you want to do more than just “make things move.” It helps you learn how to make motion support communication and user experience.
Starting with GSAP does not mean starting with complexity
This point is crucial.
Focusing on GSAP first does not mean that the course will throw advanced JavaScript at you immediately. It does not mean we begin with complex app-like animation systems.
Instead, it means we use GSAP as the conceptual base, but we teach it in a beginner-friendly sequence.
So your early GSAP learning will likely involve very understandable tasks such as:
- animate one element,
- change opacity,
- move something slightly on load,
- reveal text or cards,
- sequence two or three simple effects,
- trigger an animation on scroll,
- understand the difference between
to,from, andfromTo, - and gradually become comfortable with selectors and properties.
That is very manageable, even if your JavaScript is still developing.
The goal is not to overwhelm you with code.
The goal is to make sure that the code you do use teaches you the real logic of animation.
Then, once those fundamentals feel familiar, Glaze enters the picture as a productivity booster.
Glaze is best learned as a strategic simplification
Glaze is not treated as “less important.” It is treated as strategically important.
That means we want you to use Glaze for the right reasons:
- because it is faster,
- because it reduces repetitive setup,
- because it fits common patterns well,
- and because it integrates nicely into your workflow for simpler or repeatable animations.
That is very different from using Glaze because:
- you do not understand the underlying animation,
- you hope the abstraction will solve all edge cases,
- or you are unable to debug when something goes wrong.
In other words:
- good use of Glaze = informed simplification
- bad use of Glaze = dependency without understanding
This course wants to lead you toward the first outcome.
When you reach the Glaze part of the course, you should be able to evaluate it intelligently:
- “This is a perfect use case for Glaze.”
- “This is possible in Glaze, but custom GSAP would give me more control.”
- “This starts simple in Glaze, but the interaction is becoming complex, so I should switch to GSAP.”
- “This animation can be prototyped quickly with Glaze and refined later with GSAP.”
That kind of judgment is extremely valuable in professional work.
This order makes you more resilient when tools change
Another often-overlooked reason to prioritize GSAP is future-proofing.
Tools, wrappers, helper libraries, builder integrations, and no-code or low-code interfaces can change over time. Some become more popular; some fade away; some change syntax or approach.
But core animation concepts remain much more stable.
If you build your understanding around GSAP fundamentals, then even if:
- Glaze evolves,
- BricksBuilder changes how scripts are handled,
- a plugin update affects implementation,
- or you move to another environment later,
you still keep the most valuable knowledge.
That means your learning is an investment, not just temporary memorization of one convenience tool.
This matters if you want to grow over years rather than just solve the next one or two website projects.
It supports a better balance between speed and mastery
The course is designed around a balance:
- mastery where mastery matters
- simplicity where simplicity is useful
GSAP is where mastery matters.
You do not need to become an advanced JavaScript engineer to benefit from this. But you do want to understand:
- the structure of animations,
- the meaning of properties,
- how sequencing works,
- how scroll-based animation works,
- and how to troubleshoot common issues.
Glaze is where simplicity is useful.
Once the mental model is in place, Glaze can help you:
- move faster,
- reduce boilerplate,
- implement common patterns efficiently,
- and stay productive inside a builder workflow.
This sequence avoids two bad extremes:
- only deep theory, no practical speed
- only easy shortcuts, no real understanding
Instead, it aims for:
- understanding first
- acceleration second
That is usually the strongest path for long-term confidence.
It helps you choose the right tool per animation
Not every animation deserves the same implementation method.
Some animations are simple and repeatable, such as:
- fade-up reveals,
- basic scroll-in effects,
- small hover interactions,
- straightforward staggered entrances.
These may be excellent candidates for Glaze.
Other animations are more custom, such as:
- tightly choreographed hero sequences,
- animations dependent on dynamic logic,
- interactions with multiple states,
- advanced scroll storytelling,
- or coordinated component behavior across sections.
These often benefit from raw GSAP.
If you learn GSAP first, you become able to classify animation needs intelligently.
You start asking:
- Is this a standard pattern or a custom motion system?
- Do I need speed or deep control here?
- Will this animation likely change later?
- Is this easy to maintain in Glaze?
- Would custom GSAP actually be cleaner?
That kind of decision-making is part of becoming efficient and professional.
Without GSAP understanding, it is harder to know when a simplified approach is enough and when it is becoming a limitation.
GSAP-first reduces intimidation in the long run
Paradoxically, many beginners think:
- “If I learn the simpler thing first, I will feel less intimidated.”
But in reality, what often happens is:
- the simple layer feels okay at first,
- then a custom requirement appears,
- then things stop being obvious,
- and now the underlying system feels even more intimidating because it was never learned properly.
By introducing GSAP early—gently, clearly, progressively—the course avoids creating that “hidden wall” later.
So instead of experiencing a sharp jump from “easy mode” to “confusing advanced mode,” you build confidence step by step.
That means your growth feels more like:
- simple GSAP basics,
- slightly richer control,
- practical scroll and sequencing concepts,
- then Glaze as a helpful shorthand,
- then choosing between them based on project needs.
This is psychologically much healthier for many learners because it removes the sense that “real animation” is some mysterious advanced territory reserved for experts.
The course wants to make you independent, not merely operational
There is a big difference between:
- being able to operate a tool,
- and being able to work independently with it.
Operational skill means:
- you can follow a pattern,
- repeat a documented setup,
- and produce expected results under familiar conditions.
Independent skill means:
- you can adapt,
- troubleshoot,
- customize,
- combine ideas,
- and solve problems when conditions are imperfect.
This course prioritizes independence.
GSAP is better suited to building independence because it exposes the real mechanics.
Glaze is then added as a practical layer that lets you work more efficiently once you already understand those mechanics.
That sequence creates a better kind of confidence:
- not “I hope this preset works,”
- but “I understand what I’m trying to achieve, and I know several ways to implement it.”
That is a much stronger place to be.
The deeper educational philosophy behind the course structure
At a deeper level, this sequencing reflects a teaching principle:
Learn the principles first, then use abstractions intentionally.
This principle appears in many fields:
- in design, you learn composition before relying on templates;
- in music, you learn rhythm and harmony before depending on presets;
- in programming, you learn logic before relying entirely on frameworks;
- in animation, you learn motion principles before relying only on convenience wrappers.
That does not mean abstractions are bad. Quite the opposite: abstractions are most powerful when used by someone who understands what they are abstracting.
So the course is not “anti-Glaze.” It is actually pro-Glaze in the right context.
It says:
- first understand motion with GSAP,
- then enjoy the speed and elegance of Glaze,
- and then move fluidly between them depending on the project.
That is a mature workflow.
A practical summary of the benefits of this order
Here is the reasoning condensed into a practical list:
-
You learn the real animation engine first
- This builds correct mental models.
-
You understand why animations work
- Not just which settings to toggle.
-
You debug more effectively
- Especially in WordPress and BricksBuilder environments.
-
You gain transferable skills
- Your knowledge remains useful beyond one tool.
-
Glaze becomes easier to understand
- Because its concepts no longer feel abstract.
-
You avoid overdependence on presets or copied snippets
- Which makes you more self-sufficient.
-
You can handle both simple and advanced use cases
- Rather than getting stuck when projects become more custom.
-
You make better tool choices
- Knowing when to use Glaze and when to use raw GSAP.
-
Your learning remains future-proof
- Even if tools or workflows evolve.
-
You build confidence gradually but deeply
- Which is especially important when your JS/CSS background is still growing.
Final takeaway
The reason this course focuses on GSAP first and Glaze second is not because Glaze is less useful. It is because GSAP gives you the real foundation, while Glaze becomes most powerful after that foundation exists. 🧩
So the course structure is designed to help you:
- understand animation rather than memorize it,
- work confidently in WordPress and BricksBuilder,
- create simple effects quickly,
- grow into more advanced animation when needed,
- and choose between control and convenience with intention.
If you want, I can next expand this topic even further in one of these directions:
- with WordPress/BricksBuilder-specific examples,
- with beginner-friendly analogies and mini examples,
- or by turning this point into an actual full lesson module with exercises.
1.2 What you will be able to do after finishing the course
By the end of this course, you will not just have seen GSAP and Glaze—you will be able to use them confidently in real WordPress + BricksBuilder projects 🎯
This section describes, in detail, what you should realistically be capable of once you have worked through the course carefully and practiced the examples.
1. You will understand the role of GSAP and Glaze in modern web animation
You will be able to clearly explain:
-
What GSAP is
- GSAP is a professional JavaScript animation library.
- It gives you precise control over motion, timing, sequencing, easing, scroll-based behavior, and interactive animation.
- It is used when CSS transitions/animations are not enough, or when animations become too complex to manage with CSS alone.
-
What Glaze is
- Glaze is a simplification layer that helps you apply GSAP-powered animation behavior more quickly.
- It is especially useful when you want to move faster, reduce code overhead, and apply common animation patterns in a cleaner workflow.
- It can be particularly attractive in builder-based environments like BricksBuilder, where convenience and maintainability matter.
-
When to use which tool
- You will know when a task is simple enough for Glaze.
- You will know when a task requires “real GSAP” for deeper control.
- You will understand that Glaze is not a replacement for understanding animation logic—it is a productivity layer on top of it.
-
Why learning both matters
- If you only learn simplified tools, you may hit limitations quickly.
- If you only learn low-level GSAP, you may work more slowly on standard tasks.
- By learning both, you gain both speed and control.
2. You will understand the animation mindset, not just copy code
A very important outcome of the course is that you will no longer see animation as “mysterious code that somehow moves things.” Instead, you will understand animation as a set of controllable concepts 🧠
You will be able to think in terms of:
-
Targets
- Which element should animate?
- Is it one element, several elements, or a group?
-
Properties
- What exactly should change?
- Position?
- Opacity?
- Scale?
- Rotation?
- Color?
- Filter?
- Clip/path-related effects where appropriate?
-
Timing
- When should the animation start?
- How long should it run?
- Should there be a delay?
- Should multiple elements animate together or one after another?
-
Direction and state
- What is the starting state?
- What is the ending state?
- Should the element animate in, out, or both?
- Should it return to its original state?
-
Trigger
- Should the animation happen on page load?
- On scroll?
- On hover?
- On click?
- When an element enters the viewport?
- When a user opens a menu, popup, or accordion?
-
Feel
- Should the motion feel smooth, snappy, elegant, energetic, dramatic, or subtle?
- You will understand that good animation is not only technical—it is also about perceived quality and user experience.
This mindset is extremely valuable because it lets you design animations intentionally instead of relying on random snippets.
3. You will be able to read and write basic-to-intermediate GSAP code with confidence
Even if your JavaScript skills are currently weak, by the end of the course you should be able to work with GSAP code without feeling lost.
You will be able to:
-
Recognize the structure of a GSAP animation
- Understand what
gsap.to(),gsap.from(), andgsap.fromTo()do. - Understand the difference between animating to a state and animating from a state.
- Know how to define duration, delay, easing, stagger, and property values.
- Understand what
-
Select elements properly
- Use classes, IDs, and scoped selectors.
- Target single or multiple elements.
- Avoid common targeting mistakes in WordPress/Bricks environments.
-
Work with variables and simple configuration
- Read animation settings inside JavaScript objects.
- Make small changes safely.
- Reuse animation patterns instead of repeating everything manually.
-
Understand enough JavaScript to support animation work
- You will not necessarily become a full JavaScript developer.
- But you will become capable of following animation-related logic.
- You will understand enough syntax to edit code confidently, troubleshoot simple issues, and adapt examples to your own layouts.
-
Debug common issues
- Why is the animation not firing?
- Is the selector wrong?
- Is the script loading too early?
- Is the target hidden or overwritten by CSS?
- Is the trigger configured incorrectly?
- Is another script interfering?
This is a major milestone: you will move from “I pasted code and hoped it worked” to “I understand what this animation is doing and can adjust it.”
4. You will be able to use Glaze efficiently for practical, fast workflows
One of the strongest practical outcomes of the course is that you will learn how to use Glaze as a time-saving layer ⚙️
You will be able to:
-
Apply simple animations faster
- Add common reveal, fade, move, and entrance effects with less code.
- Use a simpler syntax/workflow for standard cases.
- Build animations more quickly inside real client projects.
-
Decide when Glaze is enough
- If you need a simple scroll-in effect, Glaze may be ideal.
- If you need advanced sequencing, dynamic logic, or custom interactive behavior, you will know when to drop down into GSAP directly.
-
Keep projects maintainable
- Avoid overengineering simple animations.
- Use streamlined solutions where appropriate.
- Create a cleaner workflow for repeated animation patterns across pages and sections.
-
Combine convenience with understanding
- You will not use Glaze blindly.
- You will understand the underlying animation concepts.
- This means that when something does not behave as expected, you can reason about it rather than getting stuck.
5. You will be able to create common real-world animation types for websites
After finishing the course, you should be able to build many of the animation patterns commonly seen on modern websites.
These include:
-
Entrance animations
- Fade in elements.
- Move elements upward, downward, left, or right as they appear.
- Combine opacity and transform for polished section reveals.
-
Staggered animations
- Animate groups of cards, buttons, list items, or columns one after another.
- Create more sophisticated visual rhythm without writing separate animations for each element.
-
Scroll-triggered animations
- Trigger animations when sections enter the viewport.
- Reveal content progressively while the user scrolls.
- Make landing pages feel more dynamic and premium.
-
Timeline-based sequences
- Animate multiple elements in a controlled order.
- Overlap animations for more advanced results.
- Create hero section intros, content transitions, and multi-step reveals.
-
Hover and interaction animations
- Improve buttons, cards, icons, and navigation items.
- Add polish without making the site feel gimmicky.
- Create responsive UI feedback that feels intentional.
-
Menu, modal, accordion, and toggle animations
- Animate opening and closing states.
- Synchronize overlays, icons, and content transitions.
- Build interactions that feel smooth instead of abrupt.
-
Text animations
- Animate headlines and short text blocks.
- Build word-by-word, line-by-line, or character-based effects where appropriate.
- Understand when text animation improves UX and when it becomes distracting.
-
Pinned or scroll-synced effects
- Understand the foundations of more immersive storytelling sections.
- Create sections that respond to scroll progression.
- Use these effects more responsibly rather than just because they look impressive.
-
Microinteractions
- Small UI motions for forms, icons, counters, notices, or hover states.
- These small effects often create a more professional feel than oversized dramatic animations.
6. You will be able to integrate animations into WordPress and BricksBuilder properly
This course is not meant to teach animation in isolation. A key result is that you will know how to apply what you learn in your actual working environment: WordPress + BricksBuilder 🧩
You will be able to:
-
Add GSAP to WordPress correctly
- Understand the different ways GSAP can be loaded.
- Know the difference between using external scripts, custom code areas, child themes, or code snippets.
- Reduce the risk of loading conflicts or broken animation setups.
-
Work inside BricksBuilder
- Identify where to place classes, IDs, custom attributes, and custom code.
- Structure sections so they are animation-friendly.
- Use Bricks elements in a way that makes targeting and sequencing easier.
-
Use reusable class-based systems
- Instead of hardcoding everything page by page, you will learn to think in reusable patterns.
- This is especially important in builder-driven projects where repetition is common.
-
Handle dynamic and CMS-driven content
- Work with repeated items, query loops, cards, and post lists.
- Animate content that is generated dynamically rather than manually placed only once.
-
Build animation-ready page structures
- You will understand that successful animation often starts with the HTML/CSS structure.
- Even with limited CSS knowledge, you will learn enough to avoid structural mistakes that make animation difficult.
-
Balance builder convenience and custom power
- You will not feel trapped by the page builder.
- You will know how to extend it intelligently with animation logic.
7. You will develop enough CSS awareness to make animations work correctly
Even though the course is centered on GSAP and Glaze, you cannot animate well without at least some CSS understanding.
By the end of the course, you should be able to understand and work with:
You do not need to become a CSS expert, but you will gain the practical CSS understanding necessary to support animation work.
8. You will be able to think in timelines and sequences, not just isolated effects
A very important leap in skill is moving from “single animation snippets” to structured animation systems.
By the end of the course, you will be able to:
-
Build animation sequences
- Animate a heading, then a text block, then a button, then an image.
- Make these feel coordinated instead of unrelated.
-
Control overlap
- Start one animation slightly before another ends.
- Create smoother, more professional motion design.
-
Manage pacing
- Know when an animation is too slow.
- Know when it is too fast.
- Create balanced timing for readability and elegance.
-
Reuse sequence patterns
- Apply similar reveal structures across different sections.
- Give a site a coherent motion language.
This is where your work starts to look less like “effects” and more like intentional design.
9. You will be able to create animations that are more professional, not just more flashy
A beginner often thinks animation means “make things move.”
An intermediate practitioner understands that good animation should support communication, hierarchy, and user experience.
After this course, you should be able to judge animations more critically:
-
You will know when animation improves clarity
- Revealing content in order can guide attention.
- Motion can make interactions easier to understand.
-
You will know when animation is too much
- Too many moving elements can feel cheap or distracting.
- Long delays can frustrate users.
- Overly dramatic effects can hurt usability and credibility.
-
You will build with purpose
- Animation for emphasis.
- Animation for orientation.
- Animation for feedback.
- Animation for polish.
-
You will begin to develop your own taste
- You will become better at noticing what feels elegant versus what feels excessive.
- This is especially important when building sites for clients or brands.
10. You will be able to troubleshoot and improve animation performance
Modern websites must not only look good—they must also behave well ⚡
By the end of the course, you should be able to:
-
Avoid common performance mistakes
- Over-animating too many elements at once.
- Using expensive properties where simpler transforms would be better.
- Triggering too many scroll effects unnecessarily.
-
Make animation choices that are more efficient
- Prefer transform and opacity where appropriate.
- Keep complex effects limited to the places where they matter most.
-
Recognize signs of animation problems
- Jank
- Stutter
- Delayed triggers
- Weird jumps
- Mobile lag
-
Test more intelligently
- Check desktop and mobile behavior.
- Consider different viewport sizes.
- Verify that dynamic content still behaves correctly.
This means your animations will not only exist—they will be more production-ready.
11. You will understand accessibility and responsible motion
A truly valuable outcome of the course is learning that animation should serve all users, not only those who enjoy motion.
You will be able to:
-
Understand reduced-motion principles
- Some users are sensitive to motion.
- You will learn to respect reduced-motion preferences.
-
Avoid harmful or frustrating animation patterns
- Excessive parallax
- Continuous unnecessary motion
- Delayed access to important content
- Motion that interferes with reading or interaction
-
Create usable experiences
- Keep animations supportive rather than obstructive.
- Ensure content remains accessible and understandable.
This is an important sign of professional maturity.
12. You will be able to build a repeatable workflow for client and personal projects
The goal is not just isolated knowledge. The goal is a workflow you can use again and again.
By the end of the course, you should be able to:
-
Plan animations before building
- Decide what should animate and why.
- Choose between GSAP and Glaze depending on complexity.
-
Set up your structure cleanly
- Organize classes and naming.
- Prepare sections for animation.
- Avoid messy ad hoc setups.
-
Implement efficiently
- Use Glaze for simple cases.
- Use GSAP for custom behavior.
- Combine both when appropriate.
-
Test and refine
- Adjust timing and easing.
- Improve the feel.
- Simplify when necessary.
-
Reuse what works
- Build your own animation patterns and snippets.
- Gradually create a personal library of reliable solutions.
This is what turns learning into long-term productivity.
13. You will be able to go beyond templates and tutorials
One of the most empowering outcomes is this: you will no longer depend entirely on pre-made snippets.
You will be able to:
-
Understand tutorials instead of just copying them
- You will know what each part is doing.
- You will be able to modify examples to fit your own layout and goals.
-
Adapt examples to BricksBuilder structures
- Change selectors.
- Change triggers.
- Change sequence order.
- Change animation properties.
-
Combine techniques
- For example, a staggered reveal plus a timeline plus a scroll trigger.
- This is where more unique and custom site experiences begin.
-
Create your own variations
- Instead of searching for the exact effect someone else already built, you will be able to construct your own version.
That shift—from dependency to adaptability—is one of the biggest benefits of the course.
14. You will be prepared for more advanced GSAP topics later
Even if this course starts at a beginner-friendly level, it should leave you with a strong base for future growth.
After finishing, you should be ready to explore more advanced topics such as:
- Complex ScrollTrigger setups
- Advanced text splitting and text choreography
- Interactive animations driven by user input
- State-based UI animation systems
- Advanced page transitions
- Animation systems across larger websites
- Performance optimization for animation-heavy experiences
- Deeper JavaScript integration
In other words, the course should not merely teach a few tricks—it should give you a foundation you can build on for years.
In one sentence
After finishing the course, you will be able to plan, build, adapt, troubleshoot, and refine professional web animations in WordPress and BricksBuilder using GSAP for power and Glaze for speed ✅
In practical terms, you should be able to say:
“I understand how web animation works, I can create common and intermediate animation patterns myself, I know when to use Glaze and when to use GSAP directly, and I can integrate all of this into real WordPress + BricksBuilder projects without relying entirely on copy-paste.”
That is the real goal of this course.
If you want, I can next expand this even further into one of these two directions:
-
A learner-focused version
- written more like “By the end of this course, you will...”, in a more motivational and didactic style
-
A curriculum-focused version
- written more like formal course outcomes and learning objectives, suitable for placing directly into the course outline
-
Both
- first the learner-friendly version, then the formal learning-objectives version
2. Animation Fundamentals Before GSAP
Before writing code or applying utility classes, this module focuses on the principles behind motion on the web. It introduces the ideas that make animation feel smooth, intentional, and professional: timing, duration, delay, easing, sequencing, spatial movement, scaling, opacity, and visual hierarchy. This is important because many animation problems are not caused by the tool, but by weak animation decisions. A solid foundation here makes everything in GSAP and Glaze easier to understand later. ✨
The module is especially useful if your CSS and JavaScript background is still developing. Rather than expecting you to already know how transforms, positioning, or browser rendering work, it gradually explains the concepts that animation depends on. You will learn the difference between animating layout-related properties and animating performant properties such as and , why some effects feel heavy or awkward, and how motion can support communication rather than distract from it.
Another key goal of this module is to train your eye. Good animation is not only technical; it is also editorial and intentional. You will begin to recognize when an effect is too fast, too dramatic, too repetitive, or disconnected from the content. By the end of this section, you should be able to evaluate motion more confidently and prepare for GSAP with a much stronger sense of why certain animation choices work better than others. 👀
2.1 What web animation actually is
Before learning GSAP or Glaze, it is extremely important to understand what web animation actually is. If you understand this foundation well, then everything later—timelines, easing, scroll animations, stagger effects, interactive motion—will make much more sense. 🧭
Web animation is not just “making things move.” It is the controlled change of something on a webpage over time.
That sentence sounds simple, but it contains the whole idea:
-
There is a thing
- for example:
- a heading
- a button
- an image
- a card
- a menu
- a section background
- for example:
-
There is a property that can change
- for example:
- position
- size
- opacity
- rotation
- color
- scale
- for example:
-
There is time
- the change does not happen instantly, but over a duration such as:
0.2s0.8s2s
- the change does not happen instantly, but over a duration such as:
-
There is a rule for how the change happens over that time
- for example:
- linear
- ease-in
- ease-out
- bounce
- elastic
- for example:
So, if a card goes from invisible to visible in 0.6s with a soft ease-out, that is web animation.
A simple definition
A practical definition is:
Web animation is the visual transition of one or more properties of an element over time, usually in response to page load, scrolling, hovering, clicking, or some other event.
This means animation always involves these building blocks:
- Element
- Property
- Start state
- End state
- Duration
- Timing/easing
- Trigger
Let’s look at each one carefully.
1. The element: what is being animated?
An animation always affects some part of the page.
That could be:
-
A single HTML element
- for example:
- a button
- an image
- a heading
- for example:
-
A group of elements
- for example:
- several cards in a grid
- menu items
- testimonial slides
- for example:
-
A pseudo-element
- such as decorative parts created with CSS
-
An SVG element
- for example:
- paths
- circles
- icons
- logos
- for example:
-
Even values not directly visible as “elements”
- like scroll position, numerical counters, or CSS custom properties
In your WordPress and BricksBuilder workflow, the “element” will often be something like:
- a Bricks section
- a container
- a block
- a heading
- a button
- an image
- a class-selected group of elements
So when we animate, we are always asking:
Which thing on the page do I want to change?
2. The property: what exactly changes?
Animation is not movement only. That is a very common misunderstanding.
An animation can change many different kinds of properties.
Common visual properties
-
Opacity
- makes something fade in or out
- example:
opacity: 0toopacity: 1
-
Position
- moves something horizontally or vertically
- example:
- from left to right
- from lower position to upper position
-
Scale
- makes something grow or shrink
- example:
scale: 0.8toscale: 1
-
Rotation
- turns an element
- example:
rotate: 0degtorotate: 180deg
-
Size
- width, height, padding, etc.
-
Color
- text color, background color, border color
-
Blur or filter effects
- for modern visual transitions
-
Clip or mask effects
- reveal animations, image wipes, text reveals
-
SVG stroke values
- often used for “draw-on” effects
-
Numerical values
- counters, progress bars, percentages
Important concept
Animation is simply:
$$
\text{property at time } t
$$
changing from one value to another.
For example:
$$
\text{opacity}: 0 \to 1
$$
or
$$
y: 50 \to 0
$$
GSAP makes this easy, but the underlying idea exists even without GSAP.
3. Start state and end state
Every animation needs at least two states:
- Start state
- End state
Example:
-
Start:
- the element is invisible and slightly lower
-
End:
- the element is visible and in its normal position
In CSS-like thinking, that might mean:
-
start:
opacity: 0transform: translateY(30px)
-
end:
opacity: 1transform: translateY(0px)
This is one of the most important mental models in animation:
Animation is the transition between states.
Without states, there is no animation—only a static design.
Why this matters so much
When beginners say, “My animation doesn’t work,” the problem is often that one of these is unclear:
- They do not know the start state.
- They do not know the end state.
- They did not set the start state properly.
- The browser cannot interpolate the values the way they expect.
So before you animate anything, ask yourself:
- Where does it begin?
- Where does it end?
- What values are changing?
That single habit will save you a lot of frustration later. ✅
4. Time: animation is controlled change across duration
The next core ingredient is time.
If a property changes instantly, that is not really perceived as animation. It is just a jump.
Animation becomes animation when the browser shows intermediate values between the start and end over a duration.
For example:
-
At
0s- opacity is
0
- opacity is
-
At
0.3s- opacity may be around
0.5
- opacity may be around
-
At
0.6s- opacity reaches
1
- opacity reaches
So the browser (or GSAP) calculates many little in-between states.
This is often called interpolation.
Simple idea of interpolation
If you move from:
$$
x = 0
$$
to
$$
x = 100
$$
over 1 second, the browser or animation engine computes the intermediate positions between 0 and 100 over that second.
That means the motion is not magic. It is calculated progression over time.
5. Easing: how the animation feels
This is where animation stops feeling mechanical and starts feeling natural.
Two animations can have:
- the same start
- the same end
- the same duration
But still feel completely different because of easing.
What easing means
Easing describes how speed changes during the animation.
For example:
-
Linear
- constant speed from start to finish
- feels mechanical
-
Ease-in
- starts slowly, then speeds up
-
Ease-out
- starts quickly, then slows down near the end
-
Ease-in-out
- starts slowly, speeds up, then slows down
-
Bounce / elastic / back
- creates stylized motion
Why easing matters
Real-world objects rarely move at perfectly constant speed.
Think of:
- a car starting to move
- a drawer closing
- a ball bouncing
- a phone menu sliding in
They accelerate and decelerate.
So easing gives digital movement a more human, physical, or polished feeling.
A design truth
A large part of “professional-looking animation” is not just what moves, but how it moves.
Beginners often focus on dramatic motion:
- huge slides
- giant zooms
- wild rotations
Professionals often focus more on:
- subtle movement
- controlled timing
- good easing
- restraint
That is one of the biggest mindset shifts in motion design. 🎯
6. Trigger: when does the animation begin?
Animation usually does not happen randomly. It needs a trigger.
A trigger is the event or condition that starts the animation.
Common triggers on the web
-
Page load
- when the page first appears
-
Scroll
- when an element enters the viewport
- when the page reaches a certain position
- when animation is linked directly to scroll progress
-
Hover
- when the mouse moves over an element
-
Click / tap
- for menus, accordions, popups, tabs
-
Focus
- important for forms and accessibility
-
Time delay
- animation starts after a short wait
-
Custom logic
- e.g. after AJAX load, after filtering, after a slider changes
In WordPress/BricksBuilder sites, many of your future animations will likely be triggered by:
- section load
- scroll into view
- hover
- click on a burger menu or button
- scroll progress across a hero section
So another core question is:
What event causes this change to begin?
7. Animation is communication, not decoration
This is one of the most important conceptual lessons.
Many people think animation is just visual decoration. Sometimes it is—but good animation usually has a purpose.
What animation can communicate
-
Attention
- “Look here first.”
-
Hierarchy
- “This item is more important than that one.”
-
Relationship
- “These things belong together.”
-
Cause and effect
- “You clicked this, so that happened.”
-
Direction
- “This panel came from the side.”
- “This dropdown belongs to this button.”
-
State change
- “This item is now active/open/selected.”
-
Feedback
- “The system received your action.”
-
Continuity
- “The interface is changing, but in a way you can follow.”
Example
- It works.
- But it may feel abrupt.
- The user understands where it came from.
- The transition feels connected.
- The interaction feels more polished.
That is animation as communication.
8. Good animation reduces confusion
When interfaces change suddenly, users can lose track of what happened.
Animation helps bridge that gap.
For example:
-
A modal appears
- if it simply pops in instantly, it can feel jarring
- if it fades and scales in subtly, the brain follows the change more easily
-
A card expands
- animation shows that the larger panel is connected to the smaller card
-
A mobile menu opens
- motion helps users understand spatial relationship
In this way, animation is not just aesthetic—it improves usability.
9. But too much animation creates confusion
This is the other side of the coin.
Bad animation can make a website feel:
- slow
- chaotic
- childish
- distracting
- hard to use
Common beginner mistakes
-
Animating too many elements
- everything fades, slides, spins, bounces at once
-
Using too much distance
- elements fly in from far away
-
Using too much duration
- animations take too long and slow down the experience
-
Using inappropriate easing
- bouncy effects on serious business websites
-
Animating for no reason
- motion that adds no meaning or clarity
-
Repeating reveal animations on every scroll
- can become annoying quickly
A practical principle
The best animation often feels inevitable, not flashy.
The user should often feel:
- “That felt smooth.”
- not:
- “Wow, look at that crazy effect!”
Of course, for landing pages, portfolios, or creative sites, more expressive animation can be appropriate. But even then, it should be intentional.
10. Web animation is constrained by the browser
Unlike motion graphics software, web animation happens in a live environment.
That means it is affected by:
- browser rendering
- screen size
- device performance
- user input
- scrolling
- responsive layouts
- accessibility preferences
So web animation is not the same as creating a video.
In a video
- every frame is predetermined
- playback is controlled
- viewer interaction is limited
On the web
- the user may scroll fast
- the layout may change on mobile
- images may load late
- content may vary in height
- the user may click during animation
- the device may be slow
This is why web animation requires both design thinking and technical thinking.
You are not animating on a fixed canvas. You are animating inside a responsive, interactive system.
11. The browser “draws” animation frame by frame
At a conceptual level, animation is displayed as a sequence of visual updates.
The browser repeatedly redraws the page, often targeting around:
$$
60 \text{ frames per second}
$$
That means ideally about 60 visual updates each second.
Why this matters
If the browser can update smoothly, the animation feels fluid.
If it cannot, the animation may:
- stutter
- lag
- skip frames
- feel choppy
This is why performance matters in web animation.
Important beginner takeaway
Not all properties are equally efficient to animate.
Generally, the most animation-friendly properties are:
- transform
- opacity
These usually perform better than animating properties like:
- width
- height
- top
- left
- heavy box-shadow changes
- complex layout-triggering properties
You do not need to master performance yet, but you should already understand this core truth:
Animation is not only a visual matter; it is also a rendering and performance matter.
This becomes especially relevant in WordPress, where pages often include:
- many plugins
- large images
- dynamic content
- page builder structures
So smooth animation requires some discipline.
12. Animation is often the illusion of movement
Here is another foundational insight:
Many times, the element is not “really moving” in the way beginners imagine. Instead, the browser is visually transforming it.
For example, when you animate with transform: translateY(...), the browser is applying a transformation for display. This is often more efficient than changing layout position directly.
That means web animation is often about the illusion of movement rather than physically rearranging the document structure at every step.
This distinction becomes very important later when we talk about:
- transforms
- layout
- reflow
- repaint
- performance
For now, the key idea is:
Good web animation often changes how something is rendered, not how the entire page layout is recalculated every moment.
13. There are different categories of web animation
To understand web animation clearly, it helps to divide it into categories.
A. State-transition animation
This is when something changes from one interface state to another.
Examples:
Purpose:
- communicate interface changes
B. Entrance/reveal animation
This is when an element enters view or becomes visible.
Examples:
- hero text fading in on page load
- cards revealing on scroll
- image sliding up into view
Purpose:
- direct attention
- create rhythm
- make content feel staged
C. Continuous/decorative animation
This runs continuously or repeatedly.
Examples:
- floating icons
- pulsing indicators
- looping background shapes
Purpose:
- add atmosphere
- bring a static layout to life
Danger:
- can become distracting if overused
D. Scroll-linked animation
Animation is tied to scroll progress.
Examples:
- parallax
- pinned sections
- progress-based image scaling
- storytelling sections
Purpose:
- create immersive narrative experiences
This is an area where GSAP is especially powerful.
E. Data/value animation
A number or progress indicator changes over time.
Examples:
- count-up statistics
- progress circles
- percentage indicators
Purpose:
- make data feel dynamic and noticeable
F. Spatial/navigation animation
This helps users understand interface movement in space.
Examples:
Purpose:
- maintain orientation
- preserve context
Understanding these categories helps you choose the right kind of motion for the job.
14. Animation has emotional tone
Motion changes how a brand feels.
The same content can feel:
- elegant
- playful
- premium
- technical
- bold
- calm
- energetic
- luxurious
depending on how it moves.
Examples
-
Short, subtle fades and slides
- often feel clean and professional
-
Elastic, bouncy movement
- often feels playful or youthful
-
Large cinematic scroll transitions
- often feel premium or editorial
-
Sharp, snappy micro-interactions
- often feel modern and tech-oriented
So animation is part of branding.
This matters for web designers and site builders because motion is not separate from design—it is part of the design language.
15. Animation should match context
A law firm website, a SaaS product website, a fashion brand site, and a creative portfolio should not all move the same way.
The right animation depends on:
- brand personality
- target audience
- content density
- user goals
- performance requirements
- device context
Example
A serious corporate site might use:
- subtle fade-ups
- restrained hover transitions
- smooth menu movement
A creative agency site might use:
- larger typography reveals
- layered parallax
- complex scroll storytelling
- image masking effects
Neither is automatically better. The question is whether the motion supports the project.
16. Web animation is usually a combination of design and code
At first glance, animation seems purely visual. But on the web, it sits between design and programming.
Design side
You think about:
- rhythm
- emphasis
- timing
- hierarchy
- brand feel
- visual clarity
Code side
You think about:
- selecting elements
- setting values
- defining duration
- handling triggers
- sequencing multiple steps
- ensuring performance
- making it responsive
This is exactly why tools like GSAP are so useful:
- they give you precise programmatic control
And why tools like Glaze are attractive:
- they reduce complexity for common animations
So in your learning journey:
- GSAP helps you understand and control animation deeply
- Glaze helps you apply animation quickly and simply in practical page-building workflows
But both still rely on the same underlying principles you are learning here.
17. Sequencing: one animation can lead into another
Animation is not always a single isolated effect.
Often, what makes a website feel polished is the sequencing of multiple animations.
Example:
- section appears
- heading fades in
- text follows shortly after
- buttons appear next
- image scales in slightly
- background shape moves subtly
This creates rhythm and structure.
Instead of everything happening at once, motion can guide the eye in a meaningful order.
This is one reason timelines are so important in GSAP later on: they let you orchestrate multiple changes as one coordinated sequence.
So web animation is not only:
- “move this thing”
It is also:
- “when should each thing happen relative to the others?”
That is a much more powerful way to think.
18. Animation can be user-controlled or system-controlled
Another useful distinction:
System-controlled animation
The website decides when and how the animation runs.
Examples:
- page load reveal
- auto-playing decorative loop
- delayed entrance sequence
User-controlled animation
The user’s action directly controls the animation.
Examples:
- hover effect
- drag interaction
- click-to-open menu
- scroll-scrubbed animation
This distinction matters because user-controlled motion often needs to feel:
- immediate
- responsive
- intuitive
Whereas system-controlled motion can be more choreographed.
19. Animation is not always visible motion
Sometimes the best animation is very subtle.
Examples:
These are still animations, even though they may not be dramatic.
This is important because beginners often think animation means:
- big motion
- obvious effects
- highly visible transitions
In reality, some of the most effective animation is almost invisible as a separate feature. It just makes the interface feel refined.
20. Accessibility matters in animation
Not all users experience motion the same way.
Some people are sensitive to movement, especially:
- parallax
- large motion effects
- aggressive zooming
- scroll-linked animations
This can cause discomfort or disorientation.
So good web animation should respect accessibility preferences, especially reduced motion settings.
Practical principle
If animation is essential, it should:
- remain understandable
- avoid causing discomfort
- degrade gracefully
If animation is decorative, it should ideally be reducible or removable when necessary.
This is not just a technical detail—it is part of responsible design. ♿
21. Web animation is about change with intention
If you remember only one conceptual sentence from this whole lesson, let it be this:
Web animation is intentional visual change over time that helps communicate, guide, respond, or enhance experience.
That definition is better than “making stuff move,” because it includes:
- intention
- time
- visual change
- user experience
That is the real foundation.
22. A mental model you can use immediately
Whenever you want to animate something, think through this checklist:
-
What element am I animating?
- a heading, button, card, image, menu, section, SVG?
-
What property is changing?
- opacity, position, scale, rotation, color, height?
-
What is the start state?
- hidden, shifted down, smaller, rotated?
-
What is the end state?
- visible, normal position, full size?
-
How long should it take?
- fast, medium, slow?
-
What easing fits the feeling?
- smooth, snappy, playful, elegant?
-
What triggers it?
- load, scroll, hover, click?
-
Why does this animation exist?
- attention, clarity, feedback, branding, delight?
-
Is it performant enough?
- especially on mobile?
-
Is it accessible and not excessive?
- would it still feel good for real users?
If you begin every animation decision with these questions, you will already think more professionally than many people who just copy random effects from tutorials.
23. A few concrete real-world examples
Let’s make all of this more tangible.
Example 1: Fade-in text on scroll
What is happening?
-
Element:
- heading
-
Property changes:
- opacity
- vertical position
-
Start state:
- invisible
- slightly lower
-
End state:
- visible
- normal position
-
Trigger:
- heading enters viewport
-
Purpose:
- draw attention gently as user scrolls
This is one of the most common animations on modern websites.
Example 2: Button hover effect
What is happening?
This tells the user:
- “This thing is interactive.”
Example 3: Mobile menu opening
What is happening?
This is more than decoration; it improves orientation.
Example 4: Stats counting up
What is happening?
-
Element:
- number text
-
Property changes:
- numeric value
-
Start state:
0
-
End state:
- e.g.
250
- e.g.
-
Trigger:
- scroll into view
-
Purpose:
- make data more noticeable and engaging
This shows that animation is not only about visual transforms.
24. How this connects to GSAP later
Once you understand what animation actually is, GSAP becomes easier to understand.
Because GSAP is essentially a powerful way to define:
- what changes
- from where
- to where
- over how long
- with what easing
- triggered by what
- in what sequence
For example, a GSAP animation often expresses exactly these ideas in code.
So the concepts come first; the syntax comes second.
This is why learning fundamentals matters so much.
25. How this connects to Glaze later
Glaze simplifies many common animation use cases by making it easier to apply motion without writing full custom GSAP logic every time.
But even when using a simplification layer, you still need to understand:
- what your start state is
- what your end state is
- what trigger you want
- whether the motion makes sense
- whether it fits the design
So Glaze can reduce coding complexity, but it does not replace animation thinking.
That is why this topic is essential even for no-code or low-code workflows in WordPress and BricksBuilder.
26. The most important beginner mindset shift
Here is the mindset shift I would most like you to keep:
Do not think of animation as “adding effects.” Think of it as designing change.
That small shift changes everything.
If you “add effects,” you often get:
- random motion
- overuse
- inconsistent style
- poor UX
If you “design change,” you start thinking about:
- states
- timing
- meaning
- interaction
- clarity
- consistency
That is the real beginning of mastering web animation.
Summary
Web animation is:
- the change of an element’s properties over time
- based on a start state and an end state
- shaped by duration and easing
- triggered by events like load, scroll, hover, or click
- used to communicate, guide, clarify, and enhance experience
- constrained by browser performance, responsiveness, and accessibility
- most effective when intentional rather than decorative only
In short:
Web animation is the controlled visual behavior of a website over time.
And that is the foundation for everything that comes next with CSS transitions, GSAP, Glaze, ScrollTrigger, timelines, and advanced interactions.
Mini self-check 📝
If you want, test your understanding by answering these questions for yourself:
- What are the 7 core building blocks of an animation?
- Why is animation more than just movement?
- What is the difference between start state and end state?
- What does easing control?
- Why can animation improve usability?
- Why can too much animation harm usability?
- Why are
transformandopacityusually important for performance? - What is the difference between decorative animation and functional animation?
2.2 The Difference Between CSS Animation, CSS Transition, JavaScript Animation, and GSAP Animation
Before learning how to animate with GSAP, it is extremely important to understand what kind of animation approaches exist in the browser at all. This gives you the mental model you need later when you decide:
- Should I solve this with pure CSS?
- Do I need JavaScript?
- Is GSAP the right tool?
- Can Glaze simplify this for me? ✨
This topic is foundational, because many animation problems in WordPress, BricksBuilder, and modern front-end work are not really “GSAP problems” — they are actually decision problems:
- What kind of motion do I want?
- What triggers it?
- How much control do I need?
- How maintainable should it be?
- Will it stay stable across browsers and page builders?
2.2.1 CSS Animation
What it is
A CSS animation is a browser-native animation defined in CSS using:
@keyframes- animation-related properties such as:
animation-nameanimation-durationanimation-delayanimation-timing-functionanimation-iteration-countanimation-directionanimation-fill-mode
With CSS animation, you define multiple stages of an animation in advance, and the browser plays them over time.
Basic idea
You describe a timeline like this:
- At the beginning, the element looks like this.
- At the middle, it looks like that.
- At the end, it looks like something else.
The browser then interpolates the in-between states automatically.
Example
@keyframes fadeUp {
from {
opacity: 0;
transform: translateY(40px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.card {
animation-name: fadeUp;
animation-duration: 0.8s;
animation-timing-function: ease;
animation-fill-mode: both;
}
This means:
- The element starts invisible and lower down.
- It moves upward.
- It becomes visible.
When CSS animation is typically used
CSS animations are good when:
-
You want an animation to play:
- automatically on page load
- infinitely in a loop
- on a class change
- as a decorative effect
-
The animation is mostly predefined, meaning:
- you already know the stages
- you do not need much dynamic logic
- you do not need advanced sequencing
-
You want a solution with little or no JavaScript.
Strengths of CSS animation ✅
-
Built into the browser
- No external library is required.
- Very lightweight for simple use cases.
-
Good for simple repeated effects
- Pulsing buttons
- Floating icons
- Background movement
- Loaders
- Decorative entrance animations
-
Declarative
- You describe what should happen, not necessarily how to calculate every frame.
- This can feel simpler for very basic effects.
-
Can perform well
- Especially when animating efficient properties like:
transformopacity
- Especially when animating efficient properties like:
Weaknesses of CSS animation ⚠️
-
Limited control during runtime
- Once the animation is defined, changing it dynamically is more awkward.
- Fine-grained runtime control is difficult.
-
Harder to coordinate complex sequences
- If you want:
- multiple elements
- staggered timing
- conditional behavior
- interruptions
- timeline-based orchestration
CSS becomes messy quickly.
- If you want:
-
Poorer logic integration
- CSS itself does not contain application logic.
- If animation depends on scroll position, user actions, state, or calculations, you often need JavaScript anyway.
-
Maintenance can get difficult
- For small effects, CSS is elegant.
- For large animation systems, many keyframes and class combinations can become hard to manage.
Mental model for CSS animation
Think of CSS animation like a pre-recorded motion clip 🎞️
You tell the browser:
“Play this motion pattern over 0.8 seconds.”
That is very useful when the motion is known ahead of time.
2.2.2 CSS Transition
What it is
A CSS transition animates a change between one state and another.
Unlike CSS animation, you usually do not define a full keyframe sequence. Instead, you say:
“If this property changes, do not switch instantly — animate it over time.”
Transitions are often used with:
:hover:focus:active- class changes added by JavaScript
- responsive UI state changes
Example
.button {
background-color: #1d4ed8;
transform: translateY(0);
transition: background-color 0.3s ease, transform 0.3s ease;
}
.button:hover {
background-color: #2563eb;
transform: translateY(-4px);
}
What happens here?
How CSS transition differs from CSS animation
This difference is very important:
-
CSS animation
- defines a motion sequence directly with keyframes
-
CSS transition
- animates the change between states when a property value changes
So:
- Animation = “play this timeline”
- Transition = “smoothly move from old state to new state”
When CSS transition is typically used
CSS transitions are ideal for:
-
Interactive UI states
- hover effects
- focus effects
- active states
- open/closed states
- class toggles
-
Small polish effects
- button hover
- card lift
- menu color change
- icon rotation
- opacity change
-
Simple component behavior
- dropdown fades
- accordions
- toggles
- modal appearance
Strengths of CSS transition ✅
-
Very simple
- Often the easiest way to add polish to a site.
-
Excellent for micro-interactions
- Hover and focus effects are a perfect use case.
-
Minimal code
- You define a transition once, and any matching property change becomes animated.
-
Browser-native and performant
- Again, especially strong when using:
transformopacity
- Again, especially strong when using:
Weaknesses of CSS transition ⚠️
-
Only reacts to changes
- A transition needs a state change.
- It does not describe a complex timeline by itself.
-
Less suitable for multi-step animation
- You cannot easily say:
- move right
- then rotate
- then fade
- then trigger another element
at least not without awkward workarounds.
- You cannot easily say:
-
Limited orchestration
- Coordinating many elements with transitions can become confusing.
-
Can become brittle in page builders
- If states are added by multiple classes or interactions in BricksBuilder, debugging transitions can sometimes become annoying.
Mental model for CSS transition
Think of CSS transition like a smooth state change 🔄
You tell the browser:
“Whenever this value changes, animate the change instead of jumping instantly.”
This is perfect for interface polish, but not ideal for sophisticated storytelling motion.
2.2.3 JavaScript Animation
What it is
JavaScript animation means using JavaScript code to change values over time.
This can be done in different ways:
-
manually with:
setInterval()setTimeout()requestAnimationFrame()
-
by toggling classes or styles dynamically
-
by calculating positions, opacity, rotation, scale, and more in code
In other words, JavaScript animation means:
“Instead of letting CSS handle the animation alone, I use JavaScript to control what changes, when it changes, and how it changes.”
A very basic example
<div class="box"></div>
.box {
width: 100px;
height: 100px;
background: tomato;
position: relative;
}
const box = document.querySelector(".box");
let position = 0;
function animate() {
position += 2;
box.style.transform = `translateX(${position}px)`;
if (position < 300) {
requestAnimationFrame(animate);
}
}
animate();
This code moves the box to the right by repeatedly updating its transform.
Why JavaScript animation exists
CSS can do many things, but sometimes you need more:
-
Animation based on user behavior
- scroll position
- drag movement
- mouse movement
- click sequences
- dynamic state
-
Animation based on calculations
- element sizes
- viewport dimensions
- physics-like motion
- randomization
- synchronized UI state
-
Complex coordination
- animate this, then that, then something else
- reverse on command
- pause/resume
- trigger callbacks
- react to application state
JavaScript allows this because it is a programming language, not just a styling language.
Strengths of JavaScript animation ✅
-
Full control
- You can calculate, trigger, interrupt, restart, reverse, and synchronize animations.
-
Dynamic behavior
- You can react to:
- scrolling
- resizing
- conditions
- fetched data
- custom logic
- You can react to:
-
Better for application-level interactions
- Especially useful when animation is not just decoration but part of how the interface works.
-
Can coordinate many elements
- Much easier than trying to force CSS alone to manage complex timelines.
Weaknesses of raw JavaScript animation ⚠️
-
More complicated
- You need to write logic, timing, updates, and cleanup.
-
Easy to do poorly
- Beginners often animate inefficient properties or write too much code.
-
Performance pitfalls
- If done incorrectly, JavaScript animation can become janky.
- Bad animation code can cause layout thrashing, repaint issues, or unnecessary work.
-
You are responsible for the engine
- If you animate manually, you must manage:
- timing
- easing
- sequencing
- synchronization
- interruptions
- browser quirks
- If you animate manually, you must manage:
This is one of the main reasons libraries like GSAP exist.
Mental model for JavaScript animation
Think of raw JavaScript animation like driving a vehicle manually 🚗
You have full control, which is powerful — but you also have full responsibility.
If you know what you are doing, you can build almost anything.
If you do not, things can get messy fast.
2.2.4 GSAP Animation
What it is
GSAP stands for GreenSock Animation Platform. It is a professional JavaScript animation library that makes animation easier, more powerful, and more reliable.
It is still JavaScript animation — but with a highly optimized animation engine and a much better API.
That means GSAP is not a completely different category from JavaScript animation. It is better understood as:
GSAP = a specialized, high-level JavaScript animation system
Basic example
gsap.to(".box", {
x: 300,
duration: 1,
opacity: 0.5,
ease: "power2.out"
});
This says:
- Select
.box - Animate it to
x: 300 - Take 1 second
- Also change opacity
- Use a smooth easing curve
Compared with raw JavaScript, this is dramatically simpler.
Why GSAP is different from raw JavaScript
Without GSAP, you would often need to manually manage:
- frame updates
- interpolation
- easing
- durations
- delays
- sequencing
- transform composition
- browser inconsistencies
GSAP handles these for you.
So instead of building the animation engine yourself, you use one that is already highly refined.
Strengths of GSAP ✅
-
Much easier than raw JavaScript
- You can create advanced motion with surprisingly little code.
-
Excellent sequencing
- Timelines are one of GSAP’s biggest strengths.
- You can orchestrate animation like a movie editor.
-
Very flexible
- Great for:
- entrances
- hover interactions
- scroll animation
- page transitions
- carousels
- text effects
- SVG animation
- complex UI choreography
- Great for:
-
Powerful runtime control
- pause
- play
- reverse
- restart
- seek
- kill
- synchronize
-
Advanced plugins and ecosystem
- ScrollTrigger is especially important for modern web work.
- This is one of the biggest reasons GSAP is so widely used.
-
High performance
- GSAP is optimized for animation work.
- It helps avoid many common beginner mistakes.
-
Cross-browser reliability
- One of GSAP’s biggest real-world advantages.
Weaknesses of GSAP ⚠️
-
It is still JavaScript
- If your JavaScript foundation is weak, there is still a learning curve.
-
Can be overkill for tiny effects
- A simple hover color transition does not need GSAP.
-
Requires intentional structure
- If you write random scattered GSAP code everywhere, projects become hard to maintain.
-
You still need animation judgment
- GSAP is powerful, but power can lead to over-animation if used without restraint.
Mental model for GSAP
Think of GSAP like a professional animation studio toolkit 🎬
You are still animating with JavaScript, but you now have:
- a powerful engine
- better controls
- better timing
- better sequencing
- less manual work
- fewer headaches
The Core Differences at a Glance
Now let us compare the four approaches directly.
1. CSS Transition vs CSS Animation
CSS Transition
- Best for state changes
- Triggered when a value changes
- Great for hover/focus/open/close interactions
- Usually simpler for UI polish
CSS Animation
- Best for predefined motion sequences
- Uses keyframes
- Good for looping or automatic decorative effects
- Better when the animation itself is the “thing”
Short version
- Transition = animate between states
- Animation = play a sequence of stages
2. CSS vs JavaScript
CSS
- Simpler for straightforward visual behavior
- Browser-native
- Less control
- Harder to make dynamic and interactive in sophisticated ways
JavaScript
- More powerful
- Can react to logic, user behavior, and real-time calculations
- Better for complex interactions
- More code and more responsibility
Short version
- CSS = easier, but less flexible
- JavaScript = more flexible, but more demanding
3. Raw JavaScript vs GSAP
Raw JavaScript animation
- Fully custom
- Low-level
- More work
- Easier to make mistakes
- Good for understanding the fundamentals
GSAP
- High-level animation framework
- Easier syntax
- Better sequencing and easing
- More professional control
- Faster development
- Better for real-world production
Short version
- Raw JS = build the machine yourself
- GSAP = use a powerful machine built for this exact job
A Practical Comparison Table
| Approach | Best for | Complexity | Control | Good for beginners | Good for complex sequences |
|---|---|---|---|---|---|
| CSS Transition | Hover, focus, simple state changes | Low | Low to medium | Yes | No |
| CSS Animation | Keyframed decorative motion, looping effects | Low to medium | Medium | Yes | Limited |
| Raw JavaScript Animation | Dynamic custom behavior | High | Very high | Not ideal | Yes |
| GSAP Animation | Professional interactive and sequenced animation | Medium | Very high | Yes, with guidance | Yes, excellent |
Real Examples from a WordPress and BricksBuilder Perspective
This is especially relevant for your workflow.
1. A button hover effect
If you want:
Use CSS transition.
Why?
- It is simple.
- It is lightweight.
- It does not need GSAP.
2. A looping icon animation
If you want:
- an arrow to gently bounce forever
- a badge to pulse continuously
Use CSS animation.
Why?
- The motion is predefined.
- It repeats.
- CSS handles this well.
3. An animation triggered when a user scrolls to a section
If you want:
- text to fade in
- images to slide in
- cards to stagger upward
- animation to depend on scroll position
This is where JavaScript becomes relevant, and GSAP with ScrollTrigger becomes especially strong.
Why?
- Scroll is dynamic.
- Timing may depend on viewport position.
- Sequencing often matters.
- CSS alone becomes limited quickly.
4. A hero section with layered animation
Suppose you want:
- headline fades in
- subheadline slides up
- button appears slightly later
- image rotates in
- decorative shapes move subtly in the background
- entire sequence feels choreographed
You could try to piece this together with CSS.
But GSAP is usually the better choice because:
- timelines make sequencing easier
- delays and overlaps are clearer
- changes are easier to manage
- the result is more maintainable
5. A highly interactive filter or product UI
If you want animation to respond to:
- clicks
- sorting
- filtering
- loading new content
- dynamic heights
- state changes
Then JavaScript is needed, and GSAP is often the best practical layer on top of it.
Where Glaze Fits Into This
Since your course also includes Glaze, it is useful to connect it here.
Glaze does not replace the underlying animation concepts. It simplifies how you apply some GSAP-based animations.
So conceptually:
-
CSS transition
- browser-native state animation
-
CSS animation
- browser-native keyframe animation
-
JavaScript animation
- code-driven animation
-
GSAP
- a powerful JavaScript animation library
-
Glaze
- a simplification layer that helps you use GSAP more conveniently in certain workflows
This means:
- if you understand the difference between CSS and JS animation,
- and if you understand why GSAP exists,
- then you will understand why Glaze is useful for simple/common patterns.
But Glaze is not magic. It is most helpful when you already understand what kind of animation problem you are solving.
The Most Important Decision Rule
A very useful professional rule is this:
Use the simplest tool that can solve the problem well
That often means:
-
Use CSS transition
- for simple hover and state changes
-
Use CSS animation
- for simple predefined or looping motion
-
Use GSAP
- for sequenced, interactive, dynamic, or scroll-based animation
-
Use raw JavaScript alone
- only when you truly need custom logic beyond what simpler tools provide
- or when building something specialized
This rule prevents two common beginner mistakes:
-
Using GSAP for everything
- which creates unnecessary complexity
-
Trying to force CSS to do what GSAP should handle
- which creates fragile solutions
A Deeper Concept: Trigger vs Timeline vs Logic
This is one of the best ways to understand the four approaches.
1. Trigger
What starts the animation?
- page load
- hover
- click
- scroll
- class change
- data load
2. Timeline
How many stages does the animation have?
- one simple state change
- one keyframed sequence
- many coordinated steps
- overlapping elements
- reversible states
3. Logic
Does the animation depend on conditions or calculations?
- no logic
- little logic
- moderate logic
- heavy logic
Now map the tools:
-
CSS transition
- simple trigger
- simple timeline
- very little logic
-
CSS animation
- simple trigger
- predefined timeline
- little logic
-
Raw JavaScript
- flexible trigger
- flexible timeline
- strong logic support
-
GSAP
- flexible trigger
- excellent timeline support
- strong logic support with better ergonomics
That is the conceptual heart of the difference.
A Beginner-Friendly Analogy
Here is a simple analogy that often helps:
CSS Transition = light switch dimmer
You change from one state to another, and the browser smooths the change.
CSS Animation = music box
You define a motion sequence, and it plays.
Raw JavaScript Animation = building your own instrument
Very powerful, but you must construct and control everything.
GSAP = professional digital audio workstation
You still create motion, but now you have an advanced system built for composition, timing, layering, and control.
Common Beginner Confusions
1. “If CSS can animate, why do I need GSAP?”
Because CSS is great for simple and predefined motion, but weaker for:
- advanced sequencing
- scroll-based interaction
- dynamic values
- timeline control
- coordinated multi-element animation
GSAP shines when animation becomes part of the behavior and structure of the experience.
2. “Is GSAP faster than CSS?”
This question is often misunderstood.
The better question is:
Which tool is better suited for this animation task?
For very simple hover effects, CSS is usually enough.
For complex timelines, coordinated transforms, scroll interactions, and runtime control, GSAP is often the more practical and reliable solution.
Performance depends heavily on:
- what properties you animate
- how often updates happen
- how much layout/repaint work is triggered
- how cleanly the animation is structured
So the answer is not simply “CSS is always faster” or “GSAP is always faster.”
The real answer is:
- simple tasks → CSS is often sufficient
- complex tasks → GSAP is often the better engineered solution
3. “Can GSAP replace CSS transitions and animations completely?”
Technically, for many effects, yes.
But should it? Not always.
A professional workflow is not about replacing everything with GSAP. It is about choosing wisely.
For example:
That is usually the healthiest approach.
4. “If I use Glaze, do I still need to understand this?”
Absolutely yes.
Because Glaze makes implementation easier, but it does not remove the need to know:
- what kind of animation you are creating
- what trigger it has
- how complex it is
- whether CSS alone would already be enough
Without that understanding, you risk using the wrong tool even if the syntax feels easier.
The Most Important Takeaways
If you remember only a few things from this lesson, remember these:
-
CSS transition animates a change between states
- best for hover, focus, toggles, small UI polish
-
CSS animation plays a predefined keyframed sequence
- best for looping or decorative motion
-
JavaScript animation gives you programmable control
- best when animation depends on logic, user behavior, or calculations
-
GSAP is a professional JavaScript animation engine
- best for complex, sequenced, interactive, and scroll-based animation
-
Glaze helps simplify parts of GSAP usage
- but it does not replace the need to understand the underlying categories
A Very Practical Rule for Your Future Projects
For your WordPress + BricksBuilder work, this rule will help a lot:
- Start by asking:
- Is this just a simple state change?
- Use CSS transition.
- Is this a predefined repeated effect?
- Use CSS animation.
- Does this depend on scroll, sequencing, logic, or many coordinated elements?
- Use GSAP.
- Do I want a simpler implementation layer for a common GSAP pattern?
- Consider Glaze.
- Is this just a simple state change?
That single decision framework will already make your animation work much more professional. 🚀
Mini Summary in One Sentence
CSS transitions are for smooth state changes, CSS animations are for predefined keyframed motion, raw JavaScript animation is for manual programmable control, and GSAP is the powerful high-level JavaScript animation system that makes complex web animation practical.
If you want, I can next continue with one of these follow-up sections:
- 2.2.5 When to use which approach in real projects
- 2.2.6 Performance basics: which CSS properties should and should not be animated
- 2.2.7 The browser rendering pipeline explained for animation beginners
- 2.2.8 Simple side-by-side examples: same animation built with transition, CSS animation, raw JS, and GSAP
My recommendation would be 2.2.8 first, because it makes these differences immediately visible.
2.3 Core visual concepts
Before you learn GSAP syntax, it’s extremely important to understand what animation is actually changing on screen. GSAP is “just” the tool. The real foundation is knowing:
- what property changes,
- how much it changes,
- when it changes, and
- how those changes relate to other elements.
If you understand the visual concepts below, GSAP becomes much easier to learn, because you’ll stop thinking in terms of “random code” and start thinking in terms of motion design decisions 🎯
These concepts apply whether you animate with:
- pure CSS
- JavaScript
- GSAP
- Glaze
- or even visual builders that output animation code
Why these concepts matter so much
Every animation you have ever seen on a website is usually built from a combination of a few simple ideas:
- Position — where an element is
- Scale — how big or small it is
- Rotation — how much it is turned
- Opacity — how visible it is
- Timing — how fast or slow it moves
- Delay — when it starts
- Sequencing — how multiple animations are arranged together
Even very “advanced” animations are often just clever combinations of these basics.
For example, a fancy hero section reveal might be nothing more than:
- headline moves upward
- headline fades in
- image scales slightly down into place
- button appears after a short delay
- everything is timed to feel smooth and intentional
So let’s break each concept down carefully.
2.3.1 Position
What “position” means in animation
Position refers to where an element appears on the screen.
When you animate position, you are moving an element from one place to another.
Common directions:
- left to right
- right to left
- top to bottom
- bottom to top
- diagonal movement
- movement along a path
Simple examples
Position in the browser: an important distinction
In web design, position can be changed in multiple ways. This is where beginners often get confused.
There are two major categories:
- Layout-based movement
- Transform-based movement
1. Layout-based movement
This includes changing properties such as:
topleftrightbottommargin- sometimes
widthorheightin ways that affect layout
These properties often cause the browser to recalculate layout, which can be heavier and less performant.
2. Transform-based movement
This includes:
transform: translateX(...)transform: translateY(...)transform: translate(...)
This is usually preferred for animation because it is often smoother and more efficient 🚀
In GSAP, this is why you’ll frequently animate things like:
xy
instead of:
lefttop
Why transform-based movement is usually better
When you animate with transforms, the browser often doesn’t need to reflow the whole page layout. Instead, it can move the element more efficiently on the rendering layer.
That means:
- better performance
- smoother animation
- less risk of layout shifts
- better user experience
So as a practical rule:
If you want an element to appear to move, prefer transform movement over changing layout properties.
Visual intuition for position
Think of an element like a paper card on a table.
- Changing position means sliding the card around the table.
- The card itself does not become bigger or smaller.
- It does not become more transparent.
- It simply changes location.
That sounds obvious, but it helps separate position from other concepts like scale and opacity.
Types of positional movement
Horizontal movement
The element moves left or right.
Common use cases:
Vertical movement
The element moves up or down.
Common use cases:
- fade-up reveals
- sticky header transitions
- dropdown menus
- “back to top” interactions
Diagonal movement
The element moves across both axes.
This can feel more dynamic, but should be used carefully because it attracts more attention.
Path-based movement
The element follows a more complex route rather than a straight line.
This is more advanced, but still built on the basic idea of changing position over time.
Position and perception
Position affects how users interpret hierarchy and attention.
For example:
- movement upward often feels like appearing or elevating
- movement downward can feel like dropping in or settling
- movement from left/right can feel like entering from outside the viewport
- small positional movement can feel elegant and subtle
- large positional movement can feel dramatic or distracting
A good animation designer asks:
- How far should this move?
- From which direction?
- Should the movement be obvious or subtle?
- Does the direction support the design?
Common beginner mistake with position
A very common mistake is moving elements too far.
For example:
- text flying in from 500 pixels away
- buttons jumping dramatically
- cards sliding long distances for no reason
Usually, especially in modern websites, smaller movement looks more professional.
A subtle move of:
10px20px30px50px
is often enough.
Large movement should be reserved for moments where dramatic motion is intentional.
Position in real website scenarios
Example 1: Hero text reveal
- headline starts slightly lower
- headline moves upward into final place
Why it works:
- feels like the text is settling into position
- creates a polished entry
- combines well with opacity
Example 2: Card hover effect
- card image shifts slightly upward
- icon nudges right
- arrow moves a few pixels
Why it works:
- small movement creates responsiveness
- makes the interface feel interactive
- avoids overwhelming the user
Example 3: Mobile menu
Why it works:
- matches the spatial logic of a hidden panel
- helps users understand where the panel came from
Key principle for position
Use position animation to guide attention, not to show off motion for its own sake.
If movement helps tell the user where to look or what just happened, it’s useful. If it just creates noise, it’s probably too much.
2.3.2 Scale
What “scale” means in animation
Scale means changing the size of an element visually.
When an element scales:
- it appears to grow larger, or
- shrink smaller
Importantly, in modern animation this is often done with transforms, not by changing actual layout width and height.
For example:
scale: 1means normal sizescale: 0.8means smallerscale: 1.2means larger
Scale is not the same as width and height
This distinction matters a lot.
Changing width and height
If you animate:
widthheight
you often affect layout. Neighboring elements may move, resize, or reflow.
Changing scale
If you animate transform: scale(...), the element visually changes size without necessarily reflowing the layout.
That makes scale animation:
- smoother
- more efficient
- better for many interactive effects
Visual intuition for scale
Imagine the same paper card on a table.
- Position = sliding the card
- Scale = making the card appear larger or smaller
- The center point stays roughly in place unless the transform origin changes
Why scale is powerful
Scale has strong psychological impact.
A slight increase in scale can suggest:
- importance
- focus
- emphasis
- approachability
- responsiveness
A decrease in scale can suggest:
- moving away
- de-emphasis
- background status
- compression
- exit
This is why scale is used so often for:
Common uses of scale
1. Entrance animation
An element starts slightly smaller and scales up into place.
This can make it feel like it is arriving gently.
2. Hover interaction
This gives immediate feedback that the element is interactive.
3. Exit animation
An element scales down as it disappears.
This can make the exit feel cleaner than simply vanishing.
4. Focus effect
A central object scales slightly larger than background objects.
This draws the eye.
Small scale changes are usually best
A common beginner mistake is using scale values that are too extreme.
For professional UI animation, subtle values often work best:
0.950.981.021.05
These feel polished.
Very large changes like:
0.223
are usually for special effects, not normal interface animation.
Uniform vs non-uniform scaling
Uniform scaling
The element scales equally in both directions.
It keeps its proportions.
Example idea:
- width and height both grow together
This is the most common and safest kind.
Non-uniform scaling
The element scales differently in horizontal and vertical directions.
This can stretch or squash the element.
That can be useful for:
- playful effects
- organic motion
- bounce exaggeration
- custom stylized interactions
But it can also look broken if used carelessly.
Scale and transform origin
This is a very important concept.
When an element scales, from which point does it scale?
That is controlled by transform origin.
Possible origins:
- center
- top
- bottom
- left
- right
- top left
- bottom center
- etc.
Why this matters
If a dropdown panel scales from the top, it can feel like it is unfolding downward.
If a line scales from the left, it can feel like it is drawing itself from left to right.
This one concept dramatically changes the feel of an animation.
Scale and realism
Scale can create a sense of depth.
For example:
- something larger feels closer
- something smaller feels farther away
- scaling during scroll can simulate parallax-like depth
- scaling background and foreground differently can create spatial richness
Even though this is only visual illusion, it feels meaningful to users.
Common mistakes with scale
1. Over-scaling on hover
If a card grows too much on hover, it can feel clumsy and can overlap neighboring content awkwardly.
2. Scaling text too aggressively
Text scaling can become blurry, heavy, or awkward if overused.
3. Ignoring transform origin
An element may appear to grow from the wrong place, making the motion feel unnatural.
4. Using scale without enough duration tuning
If scale happens too fast, it can feel like a glitch instead of intentional animation.
Best-practice mindset for scale
Use scale for emphasis, focus, depth, and tactile feedback.
Think of it as a way to make interfaces feel more alive—not as a way to constantly enlarge everything.
2.3.3 Rotation
What “rotation” means in animation
Rotation means turning an element around a pivot point.
Examples:
- a plus icon rotates into an X
- an arrow rotates downward when an accordion opens
- a card tilts slightly on hover
- an object spins
- a loader rotates continuously
Rotation is one of the simplest animation types, but it can range from very subtle to very dramatic.
Visual intuition for rotation
Again, imagine a paper card on a table.
- Position = slide it
- Scale = resize it
- Rotation = turn it around a point
This point is usually its center, but not always.
Rotation and transform origin
Just like with scale, rotation depends heavily on transform origin.
If an element rotates around its center, it spins in place.
If it rotates around one edge, it behaves more like a hinged object.
Examples:
This is a huge part of making motion feel natural.
Common uses of rotation
1. Icon state changes
Very common in UI:
- chevron rotates when accordion opens
- plus rotates into close icon
- arrow rotates to show expanded/collapsed state
This is practical because it communicates state clearly.
2. Decorative motion
Background shapes or badges can rotate slightly for energy.
3. Loading indicators
Continuous rotation is often used for spinners.
4. 3D-style interaction
Slight tilt on hover can create a modern interactive feel.
Subtle rotation vs dramatic rotation
Subtle rotation
Small values like:
2deg5deg10deg
can make interfaces feel dynamic without being distracting.
Dramatic rotation
Larger values like:
90deg180deg360deg
are more noticeable and should be used intentionally.
Rotation communicates meaning
Rotation is not just visual movement—it often implies state change.
For example:
- arrow rotates down = content expanded
- arrow rotates up = content collapsed
- plus rotates 45 degrees = close action
- spinning loader = processing
So rotation can function as both:
- animation
- communication
That makes it especially useful in UI design.
Rotation can easily be overused
Beginners sometimes use too much spinning because it is visually obvious and fun.
But on professional sites, excessive rotation often feels:
- distracting
- gimmicky
- unrefined
- difficult to read visually
In most interface work, rotation is best when it is:
- subtle
- meaningful
- supporting a state change
2D vs 3D-feeling rotation
Even before advanced 3D transforms, you should understand that some rotations feel flat while others feel spatial.
Examples:
- flat icon spinning = simple 2D rotation
- card tilting slightly = more depth-oriented feeling
- layered elements rotating differently = richer composition
You do not need advanced math for this at the beginning. Just understand:
rotation can either feel like “spinning” or like “tilting,” depending on how you use it.
Common mistakes with rotation
1. Rotating text too much
This often hurts readability.
2. Using rotation where simpler motion would work better
Sometimes a small position shift or opacity change is cleaner.
3. Incorrect pivot point
If the transform origin is wrong, the rotation can feel awkward and fake.
4. Too much continuous motion
Constant rotation draws attention forever, which can become annoying.
Best-practice mindset for rotation
Rotation works best when it supports state, direction, or subtle energy.
Use it where turning makes conceptual sense.
2.3.4 Opacity
What “opacity” means in animation
Opacity controls how visible an element is.
Typical values:
1= fully visible0= fully invisible
Values between those create partial transparency.
Opacity is one of the most important animation properties because it is often combined with almost everything else.
Why opacity is so useful
Opacity lets elements:
- appear gently
- disappear smoothly
- feel less abrupt
- blend into motion naturally
Without opacity, movement alone can feel harsh.
For example:
- if text just appears instantly, it can feel mechanical
- if text moves slightly and fades in, it feels more polished
That is why “fade in” is such a common pattern.
Opacity does not equal display
This distinction is very important.
If something has opacity: 0, it is visually invisible—but it may still:
- exist in the document
- occupy space
- be clickable
- be focusable
- affect interaction depending on setup
This is different from things like:
display: nonevisibility: hidden
That matters in real projects, especially for accessibility and interaction.
Common uses of opacity
1. Fade in
An element gradually becomes visible.
Used for:
- text reveals
- image reveals
- sections entering viewport
- modals
2. Fade out
An element gradually disappears.
Used for:
- closing overlays
- removing notifications
- transitioning between states
3. Crossfading
One element fades out while another fades in.
This is useful for galleries, tab content, sliders, and testimonial swaps.
4. Softening background elements
Lower opacity can de-emphasize secondary content.
Opacity works best in combination
Opacity alone can be useful, but it is often strongest when combined with other properties.
For example:
-
opacity + position
Fade up reveal -
opacity + scale
Pop-in effect -
opacity + rotation
Soft icon transition -
opacity + blur
Atmospheric reveal, though blur introduces more complexity and performance considerations
Why opacity makes animation feel smoother
Opacity helps the brain accept visual change more comfortably.
If an element goes from “not visible” to “visible” gradually, the transition feels more natural than instant switching.
That is especially helpful for:
- page sections
- modal dialogs
- menus
- dynamic content changes
Common mistakes with opacity
1. Fading while leaving interaction active
An invisible element may still be clickable if not handled properly.
2. Making text too transparent
Text at low opacity can become hard to read and may hurt accessibility.
3. Overusing fade-only animation
If everything only fades, the site can feel flat and repetitive.
4. Using long fades everywhere
Slow fades may feel elegant in one place, but sluggish if repeated too often.
Opacity and design quality
Opacity is often associated with “elegant” animation because it softens entry and exit. But elegance comes from restraint.
A tiny fade combined with thoughtful timing is often enough.
Best-practice mindset for opacity
Use opacity to control visual presence and soften transitions.
Think of opacity as the difference between an element popping in mechanically and arriving naturally.
2.3.5 Timing
What “timing” means in animation
Timing refers to how the animation unfolds over time.
This includes:
- duration — how long the animation lasts
- easing — how the speed changes during the animation
Timing is one of the biggest reasons why one animation feels polished and another feels awkward.
You can animate the same properties:
- same position
- same scale
- same opacity
but if the timing is bad, the result will still feel wrong.
Duration
What duration is
Duration is simply the total time an animation takes.
Examples:
- very short
- moderate
- long
In practical web animation, many UI animations are fairly short, but the “right” duration depends on the context.
How duration changes perception
Short duration
Feels:
- fast
- responsive
- sharp
- sometimes abrupt
Good for:
Medium duration
Feels:
- smooth
- balanced
- intentional
Good for:
- text reveals
- card entrances
- section transitions
Long duration
Feels:
- cinematic
- dramatic
- calm
- sometimes slow or heavy
Good for:
- hero animations
- storytelling sections
- premium brand moments
But too many long animations make a site feel sluggish.
Easing
What easing is
Easing defines how speed changes during the animation.
An animation does not have to move at the same speed from start to finish.
That is the key idea.
Easing can make motion feel:
- natural
- mechanical
- energetic
- soft
- heavy
- playful
Why easing matters so much
In the real world, objects rarely:
- start instantly at full speed
- move perfectly evenly
- stop instantly without transition
Natural motion usually includes:
- acceleration
- deceleration
- momentum-like feeling
Easing brings some of that believability into digital interfaces.
Common easing styles conceptually
Linear
Moves at constant speed.
Useful in some cases, such as:
- continuous loops
- marquees
- mechanical effects
But often feels unnatural for UI entry and exit motion.
Ease out
Starts faster and ends slower.
This is extremely common for entrance animations because the element settles nicely into place.
Ease in
Starts slower and speeds up.
Often useful for exits, because it feels like the element is leaving with increasing momentum.
Ease in out
Starts gently, speeds up, then slows down.
Often useful for balanced transitions.
Timing and emotional tone
Timing changes the emotional feel of an animation:
- fast + sharp = responsive, technical
- medium + smooth = polished, modern
- slow + soft = elegant, luxurious
- springy or bouncy = playful, energetic
This means timing is not just technical—it is part of branding and UX.
A useful way to think about timing
Ask yourself:
- Should this feel instant or noticeable?
- Should this feel energetic or calm?
- Is this an interaction or a presentation?
- Should users admire this motion, or barely notice it?
A homepage hero reveal can be slower and more expressive.
Common timing mistakes
1. Everything takes the same duration
This makes motion feel robotic.
2. Everything is too slow
This is one of the most common beginner issues.
What feels “smooth” in your imagination can feel “laggy” in real use.
3. Using linear easing for all UI motion
This often feels unnatural.
4. No consistency
If every component has wildly different timing, the site feels uncoordinated.
Best-practice mindset for timing
Timing is what makes animation feel intentional rather than accidental.
You are not only deciding what moves, but how it behaves in time.
2.3.6 Delay
What “delay” means in animation
Delay means waiting a certain amount of time before an animation begins.
The animation does not start immediately—it pauses first.
This sounds simple, but delay has a major effect on rhythm and clarity.
Why delay is useful
Delay can help you:
- guide attention
- create hierarchy
- prevent too many things from happening at once
- make motion feel staged and intentional
- connect related elements in a meaningful order
Example of no delay vs delay
Imagine a hero section with:
- heading
- paragraph
- button
- image
If everything starts at once
The result may feel:
- busy
- noisy
- harder to follow
If elements start with small delays
The result may feel:
- organized
- cinematic
- easier to understand
The user’s eye gets a clearer path through the content.
Delay creates hierarchy
Suppose you animate these elements in order:
- heading
- supporting text
- button
This sequence tells the user:
- first read the main message
- then read the supporting information
- then notice the call to action
That is not just animation. That is communication design.
Small delays vs large delays
Small delays
These are often best for interface work.
They create rhythm without making the site feel slow.
Large delays
These can feel dramatic, but they can also frustrate users if they are forced to wait too long.
This is especially risky for:
In UX, delays should usually support clarity—not slow people down unnecessarily.
Delay in hover interactions
A little caution here:
For hover animations, delays can be helpful in some rare cases, but often they make the interface feel less responsive.
For example:
- hover should usually react quickly
- if the user hovers and nothing happens immediately, it may feel broken
So delay is often more useful for:
- entrance animations
- staggered reveals
- orchestrated timelines
than for immediate interactions.
Delay and pacing
Delay contributes to the pacing of a whole animated experience.
Think like a film editor:
- what should happen first?
- what should happen second?
- should there be a pause?
- should multiple things overlap?
- should the sequence feel quick or luxurious?
Delay helps answer those questions.
Common mistakes with delay
1. Too much delay
Users should not have to wait for content unnecessarily.
2. Delaying important information
If key text or controls appear too late, the site can feel annoying.
3. Using delay everywhere
This can make the entire site feel sluggish.
4. Delay without purpose
If you cannot explain why the delay exists, it might not need to be there.
Best-practice mindset for delay
Delay is a rhythm tool, not a decoration.
Use it to improve order, hierarchy, and attention flow.
2.3.7 Sequencing
What “sequencing” means in animation
Sequencing means deciding the order and relationship of multiple animations.
This is where animation starts to feel like a real system rather than isolated effects.
Instead of asking:
- “How does this one element animate?”
you ask:
- “How do these elements animate together?”
That is sequencing.
Why sequencing matters
Most website animations do not involve just one element.
A typical section may contain:
- heading
- text
- image
- button
- background decoration
- cards
- icons
If all of these animate independently without a plan, the result can feel chaotic.
Sequencing gives structure.
Three basic sequencing relationships
1. Simultaneous
Everything starts at the same time.
This can work when:
- the motion is simple
- the group should feel unified
- there are only a few elements
But with many elements, this can become visually noisy.
2. Sequential
One animation starts after another.
This creates:
- order
- hierarchy
- storytelling
- guided attention
3. Overlapping
A second animation begins before the first one fully finishes.
This is often the sweet spot for polished motion.
It feels:
- fluid
- connected
- professional
Too much strict waiting can feel stiff.
Too much simultaneity can feel messy.
Overlap often gives the best balance.
Sequencing creates storytelling
Even simple website sections can tell a mini-story through sequencing.
For example:
- background image becomes visible
- headline moves in
- paragraph fades up
- button appears
- decorative line expands
This gives the user a visual reading order.
Sequencing and hierarchy
The order of motion communicates importance.
Usually:
- primary content animates first
- secondary content animates after
- decorative content either animates subtly or later
If a decorative flourish animates before the main headline, you may accidentally draw attention to the wrong thing.
Sequencing and rhythm
Sequencing is not only about order, but also about spacing in time.
Questions to consider:
- Should each step wait fully for the previous one?
- Should they overlap?
- Should the sequence feel tight and snappy?
- Should it breathe and feel luxurious?
This is rhythm.
Sequencing patterns you’ll use often
Pattern 1: Heading → text → button
Very common for hero sections and banners.
Pattern 2: Staggered card reveal
Cards enter one after another.
This helps users scan a set naturally.
Pattern 3: Image first, text second
Useful when the visual should establish context.
Pattern 4: Text first, image second
Useful when the message is more important than decoration.
Pattern 5: Parent and child sequencing
A section becomes visible, then internal elements animate in.
This creates structure and avoids clutter.
Sequencing and user attention
Animation should support the natural reading flow.
For left-to-right languages, users often scan:
- top to bottom
- left to right
So sequencing that follows that logic can feel intuitive.
But you can also intentionally break that order if a design calls for it.
The key is that the sequence should feel motivated, not random.
Common mistakes with sequencing
1. Too many animated elements
If every little thing has its own sequence, users become overwhelmed.
2. No hierarchy
If everything is treated equally, nothing feels important.
3. Overly long sequences
Users may have to wait too long before the interface feels ready.
4. Decorative elements dominating the sequence
The main content should usually win.
5. No consistency across the site
If each section has a completely different sequencing logic, the site can feel disjointed.
Best-practice mindset for sequencing
Sequencing is choreography.
You are arranging motion so the user’s eye moves through content in a clear, intentional way.
How all seven concepts work together
These concepts rarely appear alone. Most useful animations combine several at once.
For example, a common “fade up” reveal includes:
- position — starts slightly lower
- opacity — starts invisible
- timing — moderate duration with smooth easing
- delay — maybe starts after the previous element
- sequencing — headline first, then paragraph, then button
Another example, a hover card might use:
- scale — card grows slightly
- position — image shifts upward
- rotation — icon tilts a little
- timing — quick and responsive
- sequencing — image and text move together, icon follows slightly
So in practice, animation design is often about building combinations.
A simple mental framework for analyzing any animation
Whenever you see an animation on a website, ask these seven questions:
-
Position
Is it moving somewhere? -
Scale
Is it getting bigger or smaller? -
Rotation
Is it turning? -
Opacity
Is it fading in or out? -
Timing
How long does it take, and how does the speed feel? -
Delay
Does it wait before starting? -
Sequencing
How does it relate to other animations nearby?
If you train yourself to analyze motion this way, you will understand GSAP much faster later.
A practical website-oriented example
Imagine a section in BricksBuilder containing:
A polished entrance might be described like this:
-
Heading
- starts
20pxlower - starts at
opacity: 0 - moves into place and fades in
- starts
-
Text
- starts slightly after the heading
- also moves upward a bit
- fades in with similar timing
-
Button
- appears after text
- maybe scales from slightly smaller
- fades in quickly
-
Image
- starts slightly larger
- fades in
- settles to normal scale
That sounds “complex,” but really it is just a combination of the seven concepts.
What this means for your future GSAP learning
When you later learn GSAP, you will see code that controls:
x,yscalerotationopacitydurationdelay- timeline order
And instead of seeing mysterious technical words, you’ll understand the visual logic behind them.
That is exactly why this section comes before GSAP syntax.
Summary
The core visual concepts of animation are:
-
Position
Changes where an element is -
Scale
Changes how large or small it appears -
Rotation
Changes its angle or direction -
Opacity
Changes how visible it is -
Timing
Controls duration and speed behavior -
Delay
Controls when the animation begins -
Sequencing
Controls how multiple animations are arranged together
If you truly understand these seven ideas, you already understand the language of animation 🧠
GSAP will then become the tool you use to express that language precisely.
Recommended mindset before moving on
Before learning actual GSAP code, try to practice this:
- Visit a few modern websites.
- Observe one animation at a time.
- Describe it using the seven concepts.
- Ask yourself why the designer made those choices.
- Think about whether the animation helps clarity, hierarchy, or emotion.
That habit will make you much stronger—not just at using GSAP, but at designing motion well.
2.4 The Most Important CSS Concepts You Need First
A detailed foundation for understanding GSAP and Glaze 🚀
Before GSAP can animate anything well, you need to understand what exactly is being animated. GSAP does not replace CSS fundamentals — it builds on top of them.
If CSS is unclear, animation will feel confusing.
For example:
- You try to move something with GSAP, but it doesn’t go where you expect.
- You scale an element, but it grows from a strange point.
- You animate
x, but the item disappears outside its container. - You change
z-index, but nothing happens. - You animate a hidden element, but it still doesn’t show.
These are usually not GSAP problems. They are CSS structure problems.
So this chapter is extremely important. Think of it as your animation preflight checklist.
Why these CSS concepts matter for animation
When you animate in GSAP or Glaze, you are often changing things like:
- position
- opacity
- scale
- rotation
- visibility
- layering
- size
- movement inside or outside a container
To understand those, you need to know:
- How elements are selected
- How elements are placed in the page layout
- How elements behave inside containers
- How transforms work
- How overlapping works
That is exactly what we cover here.
2.4.1 Classes
What a class is
A class is a reusable label you give to one or more HTML elements.
Example:
<div class="card"></div>
<div class="card"></div>
<div class="card"></div>
All three elements have the class card.
In CSS, you target a class with a dot:
.card {
background: #eee;
padding: 20px;
}
That means: “apply this styling to all elements with the class card.”
Why classes matter for GSAP
Classes are one of the most common ways to target elements for animation.
Example with GSAP:
gsap.to(".card", {
y: -20,
duration: 1
});
This tells GSAP to animate all elements with the class .card.
This is incredibly useful because animation often applies to:
- multiple cards
- buttons
- images
- headings
- sections
- icons
- repeated items in a list or grid
So classes are usually your main animation hooks.
Why classes are especially useful in WordPress and BricksBuilder
In WordPress and BricksBuilder, you often work with:
- reusable components
- repeated content
- loops
- builder-generated elements
Using classes lets you apply animation logic to many items at once.
Examples:
.feature-card.fade-in.hero-title.cta-button.grid-item
This is much better than targeting random auto-generated builder selectors.
Good mental model
Think of a class as:
If 8 elements should behave similarly, give them a class.
Example
<section class="services">
<div class="service-card"></div>
<div class="service-card"></div>
<div class="service-card"></div>
</section>
gsap.from(".service-card", {
opacity: 0,
y: 40,
duration: 0.8,
stagger: 0.2
});
Here the class makes staggered animation easy.
Common beginner mistakes with classes
1. Forgetting the dot in CSS or GSAP selector
Correct:
gsap.to(".box", { x: 100 });
Incorrect:
gsap.to("box", { x: 100 });
Without the dot, GSAP looks for an HTML tag named box.
2. Using classes that are too generic
Avoid class names like:
.blue.big.left
These describe appearance, not purpose.
Better:
.hero-image.testimonial-card.pricing-item
This is cleaner and easier to maintain.
3. Depending only on builder-generated class names
Page builders often create classes that are not memorable or stable enough for your animation logic.
Prefer adding your own classes intentionally.
Best practice
Use classes for:
- Styling groups
- Animation targeting
- Reusable elements
In animation work, classes are usually more useful than IDs.
2.4.2 IDs
What an ID is
An ID is a unique label for a single HTML element.
Example:
<section id="hero"></section>
In CSS, you target an ID with #:
#hero {
min-height: 100vh;
}
In GSAP:
gsap.from("#hero", {
opacity: 0,
duration: 1
});
Main difference between classes and IDs
- A class can be used on many elements.
- An ID should be used only once on the page.
So:
<div class="card"></div>
<div class="card"></div>
is normal, but:
<div id="card"></div>
<div id="card"></div>
is wrong.
IDs must be unique.
Why IDs matter in animation
IDs are useful when:
- You need to target one specific element
- That element is important and unique
- You want a very clear selector
Examples:
When IDs are useful in WordPress and BricksBuilder
They can be useful for:
- unique sections
- anchor links
- one-off animation targets
- page-specific interactions
For example, if you have exactly one hero section on a page, #hero may be fine.
Why classes are often better than IDs for animation
Even though IDs are valid, classes are often more flexible because:
- They can be reused
- They work better for multiple elements
- They are easier for staggered animation
- They fit component-based design better
For example, if later you add another hero-like section, an ID will not scale well.
Important caution about IDs
IDs have historically had stronger CSS specificity than classes.
That means styles attached to IDs can be harder to override.
This matters because if your CSS becomes difficult to override, your animation debugging becomes harder too.
You do not need to become a specificity expert yet, but remember:
- classes are usually safer and more reusable
- IDs should be reserved for truly unique elements
Simple rule of thumb
Use:
- Class for reusable styling and animation
- ID for one unique element when it truly makes sense
2.4.3 Nesting and hierarchy
What nesting means
HTML elements live inside other elements.
Example:
<section class="hero">
<div class="hero-inner">
<h1 class="hero-title">Welcome</h1>
<p class="hero-text">Hello world</p>
</div>
</section>
Here the structure is:
.hero- contains
.hero-inner- contains
.hero-title - contains
.hero-text
- contains
- contains
This is called nesting or hierarchy.
Why hierarchy matters for animation
Animation almost always happens inside a structure.
For example:
- a child moves inside a parent
- text reveals inside a masked container
- an image scales inside a card
- a button animates when its parent is hovered
- items stagger because they share the same parent context
If you do not understand parent-child relationships, animation logic gets messy very quickly.
Parent and child
In HTML/CSS:
- The outer element is the parent
- The inner element is the child
Example:
<div class="card">
<img class="card-image" src="image.jpg" alt="">
</div>
.cardis the parent.card-imageis the child
Why this matters in practice
Imagine you animate the image:
gsap.to(".card-image", {
scale: 1.2,
duration: 1
});
If the parent .card has:
.card {
overflow: hidden;
}
then the scaled image stays visually clipped inside the card.
If the parent does not have overflow: hidden, the image may grow outside the card.
That is hierarchy affecting animation.
Descendant targeting
You can target nested elements in CSS using spaces:
.hero .hero-title {
color: white;
}
This means: any .hero-title inside .hero.
In GSAP you can also use nested selectors:
gsap.from(".hero .hero-title", {
y: 40,
opacity: 0
});
This helps you target specific elements in a specific context.
Why hierarchy is important for cleaner animations
Let’s say your site has multiple headings with class .title.
If you animate:
gsap.from(".title", { opacity: 0 });
you may animate every title on the whole page.
But if you target:
gsap.from(".hero .title", { opacity: 0 });
you only animate titles inside .hero.
This gives you control.
Containers are extremely important
A lot of animation setups are based on the idea of a wrapper.
Example:
<div class="mask">
<div class="text">Animated Text</div>
</div>
The outer wrapper controls behavior such as:
- clipping
- positioning reference
- alignment
- spacing
The inner element is the thing that moves.
This pattern appears constantly in animation.
Very important beginner idea
Often the thing you animate is not the same thing that controls layout.
For example:
- Parent handles width, height, clipping, positioning
- Child handles movement, rotation, scale
This separation makes animation much easier.
2.4.4 Display types
What display means
The display property controls how an element behaves in layout.
This is one of the most important CSS properties in general.
Common values include:
blockinlineinline-blockflexgridnone
block
Block elements usually:
- take up the full available width
- start on a new line
- stack vertically
Examples of block-like elements:
divsectionph1
Example:
.box {
display: block;
}
For animation, block elements are often easy to work with because they behave predictably in layout.
inline
Inline elements:
- flow within text
- do not naturally start on a new line
- do not behave like boxes in the same way as block elements
Examples:
spanastrong
If you try to animate width, height, or transform behavior on inline elements, results can sometimes be confusing.
That is why animated text spans are often changed to:
display: inline-block;
inline-block
This is a very useful middle ground.
An inline-block element:
- stays inline with text
- but behaves more like a box
- can be transformed more predictably
This is common for:
- animated letters
- animated words
- badges
- buttons
- icons
Example:
.word {
display: inline-block;
}
Now scaling or translating .word is usually more reliable.
flex
Flexbox is used to align and arrange items in a row or column.
Example:
.container {
display: flex;
gap: 20px;
}
This makes child elements line up more easily.
For animation, flex matters because:
- item positioning depends on flex rules
- spacing can affect motion perception
- flex containers are common in modern layouts
- animating items inside a flex layout is extremely common
If something “moves strangely,” the parent flex rules may be part of the reason.
grid
CSS Grid is another layout system.
Example:
.grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
}
This creates a structured grid.
For animation:
- grid items often animate in sequence
- staggered entrance effects are common
- layout is controlled by the grid, while transforms affect visual movement
Again, layout and animation are related but not identical.
none
.element {
display: none;
}
This removes the element from layout completely.
Important: if an element is display: none, it is effectively not present for visual animation.
This is crucial.
If you try:
gsap.to(".element", { opacity: 1 });
but the element is display: none, it still won’t show as expected until display is changed.
Animation-related warning about display
display is generally not smoothly animatable like opacity or transform.
You usually do not tween it visually from one state to another.
Instead, a common strategy is:
- Set
displayso the element can exist - Animate
opacity,y,scale, etc.
For example:
- bad idea: trying to smoothly animate from
display: nonetodisplay: block - better idea: switch display, then fade in with opacity
A practical example
Suppose you have a popup.
Instead of relying on display animation, you might think in steps:
- Make it present in layout
- Fade it in
- Move it slightly upward
- Scale it subtly
This feels much smoother.
2.4.5 Positioning basics
Why positioning is essential for animation
A huge amount of animation depends on where an element is located and what reference point it uses.
CSS positioning tells the browser how to place an element.
The main values are:
staticrelativeabsolutefixedsticky
static
This is the default.
.box {
position: static;
}
A statically positioned element sits in normal document flow.
Properties like top, left, right, and bottom generally do not work in the usual way here.
For animation, static is often fine if you only animate transforms such as x, y, scale, and rotate.
relative
.box {
position: relative;
}
This does two important things:
- The element remains in normal flow
- It becomes a reference point for absolutely positioned children
This is extremely important.
absolute
.child {
position: absolute;
top: 0;
left: 0;
}
An absolutely positioned element is removed from normal document flow and positioned relative to its nearest positioned ancestor.
That means:
- if no parent has
position: relativeor another positioning value, it may position relative to the page or another ancestor - if the parent is positioned, the child can align inside that parent
Classic animation pattern
<div class="card">
<div class="badge"></div>
</div>
.card {
position: relative;
}
.badge {
position: absolute;
top: 10px;
right: 10px;
}
Now the badge sits relative to the card.
This matters because if you animate the badge, you usually want it anchored to the card, not the whole page.
fixed
.menu {
position: fixed;
top: 0;
left: 0;
}
A fixed element is positioned relative to the viewport.
It stays in place while the page scrolls.
Common uses:
- sticky headers
- floating buttons
- overlays
- back-to-top buttons
Animation-wise, fixed elements are often used in:
sticky
.sidebar {
position: sticky;
top: 20px;
}
A sticky element behaves like a normal element until a scroll threshold is reached, then it sticks.
This is useful for:
When using GSAP with scroll interactions, understanding sticky behavior helps avoid confusion.
Positioning and GSAP movement
Very important: when you animate with GSAP using properties like x and y, you are usually animating transform-based movement, not changing top and left.
That is good.
Why?
Because transform-based movement is generally:
- smoother
- more performant
- less disruptive to layout
So even if positioning determines where the element starts, GSAP often moves it visually using transforms.
Common beginner confusion: top/left vs x/y
These are not the same idea.
top and left
- layout-position related
- depend strongly on positioning mode
- can affect layout behavior more directly
x and y in GSAP
- usually map to transforms
- move visually
- are often easier and smoother for animation
So in animation work, x and y are often preferred.
Practical rule
Use CSS positioning to establish where elements belong.
Use GSAP transforms to create how elements move.
That combination is powerful.
2.4.6 Overflow
What overflow means
overflow controls what happens when content extends beyond an element’s boundaries.
Common values:
visible
This is often the default.
If a child grows or moves beyond the parent, it can still be seen.
Example:
.card {
overflow: visible;
}
If you scale a child image up, it may spill outside the card.
hidden
.card {
overflow: hidden;
}
Anything outside the boundaries gets clipped.
This is one of the most important properties in animation.
Why?
Because many effects rely on clipping:
- image zoom inside a card
- text reveal from below
- wipe effects
- sliding content that should stay inside a container
Example: image zoom card
<div class="card">
<img class="card-image" src="image.jpg" alt="">
</div>
.card {
overflow: hidden;
}
.card-image {
width: 100%;
}
Now if GSAP scales .card-image, the image remains visually contained.
Without overflow: hidden, the effect often looks messy.
Example: text reveal
<div class="text-mask">
<div class="text-line">Hello World</div>
</div>
.text-mask {
overflow: hidden;
}
Then you can animate .text-line upward into view.
The mask hides the extra part until it slides in.
This is a very common professional animation pattern.
auto and scroll
These are more related to scrollbars.
autoshows scrollbars when neededscrollforces them
These matter less for simple animation, but become relevant when dealing with scroll containers.
Why overflow often causes confusion
You animate an element and wonder:
- Why is it cut off?
- Why does it disappear at the edge?
- Why can’t I see the full movement?
Very often the answer is:
- a parent has
overflow: hidden
Or the opposite:
- the parent does not have
overflow: hidden, so the effect leaks outside
So when debugging animation, always inspect parent containers.
Not just the animated element itself.
2.4.7 Transform
What transform is
transform lets you visually change an element without altering normal layout in the same heavy way as many other properties.
This is one of the most important animation concepts in all of front-end development.
Common transform functions include:
translatescalerotateskew
translate
Moves an element visually.
Example:
.box {
transform: translateX(100px);
}
This moves it 100 pixels to the right visually.
GSAP equivalents are often:
xy
Example:
gsap.to(".box", {
x: 100
});
This is extremely common.
scale
Changes size visually.
.box {
transform: scale(1.2);
}
This makes the element 20% larger.
GSAP:
gsap.to(".box", {
scale: 1.2
});
Great for:
- hover effects
- image zooms
- pop-in entrances
- emphasis effects
rotate
Rotates an element.
.box {
transform: rotate(45deg);
}
GSAP:
gsap.to(".box", {
rotation: 45
});
Useful for:
- icons
- decorative elements
- playful motion
- directional reveals
skew
Tilts the element.
.box {
transform: skewX(10deg);
}
GSAP can animate skew too.
This is less common for beginners, but useful in stylized motion.
Why transform is so important for GSAP
GSAP often works best when animating transform-related properties because they are:
- smoother
- more performant
- visually flexible
- less disruptive to layout
This is one major reason GSAP feels so good.
Important concept: transforms are visual, not normal layout movement
If you move something with transform: translateX(100px), the browser still treats its original layout position as its normal place.
That means:
- the element appears moved
- but document flow does not rearrange around the moved result in the same way
This is very important.
For animation, this is usually excellent.
For layout assumptions, it can confuse beginners.
Transform order matters
If multiple transforms are combined, the result depends on order.
Example conceptually:
- move then rotate
- rotate then move
These can produce different visual results.
You do not need to master transform math right now, but you should know:
transforms are not just isolated effects — they interact.
GSAP helps manage this more easily than raw CSS.
Why transformed elements may look blurry or behave unexpectedly
Sometimes when scaling or moving:
- text may appear slightly softer
- edges may look different
- subpixel rendering may occur
This is normal in some situations.
It is not always a mistake.
Practical animation mindset
For most modern UI animation, transform is your best friend.
Especially:
xyscalerotationopacity
These are among the most common GSAP properties you will use.
2.4.8 Transform origin
What transform origin means
If transform changes an element, transform-origin defines the point from which the transformation happens.
This is another critical concept.
Example:
- If you scale an element, from where does it grow?
- If you rotate an element, around which point does it turn?
That is controlled by transform-origin.
Default behavior
By default, transforms usually happen around the center of the element.
So if you scale something up, it grows outward from the center.
That is often fine, but not always what you want.
Example
.box {
transform-origin: center center;
}
This means the center is the pivot point.
Other examples:
.box {
transform-origin: top left;
}
.box {
transform-origin: bottom center;
}
Why this matters for animation
If the transform origin is centered, it will grow in both directions.
If the transform origin is left center, it grows from left to right.
That changes the feel completely.
Example: reveal line
.line {
transform: scaleX(0);
transform-origin: left center;
}
Then animate to full width.
Now it feels like a line drawing from left to right.
If origin were center, the line would expand both ways.
Example: card flip or hinge-like effect
If you rotate an element and want it to feel like a door opening, the origin should often be on one edge:
.panel {
transform-origin: left center;
}
Then rotation feels like a hinge.
Common use cases
Transform origin is very important for:
GSAP and transform origin
GSAP can control transform origin directly.
Example:
gsap.to(".line", {
scaleX: 1,
transformOrigin: "left center",
duration: 0.6
});
This is very useful because you can define not only what changes, but also how it feels spatially.
Beginner mistake
A lot of people scale or rotate something, then say:
- “Why is it growing from the wrong point?”
- “Why does it not swing naturally?”
- “Why does this reveal look weird?”
The answer is often: wrong transform origin.
2.4.9 Z-index
What z-index means
z-index controls the stacking order of overlapping elements.
Think of it as deciding which element appears:
- in front
- behind
The higher value is generally placed above the lower value.
Example:
.box-a {
z-index: 1;
}
.box-b {
z-index: 2;
}
Here .box-b will appear in front of .box-a, assuming they overlap and positioning conditions are met.
Why z-index matters for animation
Animations often involve overlapping elements:
- modals over content
- text over images
- decorative shapes behind headings
- cards passing over each other
- menus opening above sections
- overlays fading in over the page
If layering is wrong, the animation may technically work but look broken.
Very important: z-index does not work in isolation
This is a huge beginner issue.
z-index usually matters on elements that are positioned, such as:
relativeabsolutefixedsticky
If an element is not participating in the right stacking context behavior, changing z-index may appear to do nothing.
Example
.card {
position: relative;
z-index: 2;
}
This makes more sense than setting z-index on a fully static element and expecting overlap behavior automatically.
Overlapping example
<div class="section">
<div class="background-shape"></div>
<h2 class="title">Hello</h2>
</div>
.section {
position: relative;
}
.background-shape {
position: absolute;
z-index: 1;
}
.title {
position: relative;
z-index: 2;
}
Now the title sits above the shape.
Why this matters for animated overlays
Imagine you animate a modal:
gsap.to(".modal", {
opacity: 1,
scale: 1,
duration: 0.5
});
If the modal has the wrong z-index, it may appear behind page content.
Then it looks like your animation failed, even though the real issue is stacking.
Stacking contexts
This is a more advanced topic, but you should at least know the term.
A stacking context is like a local layering world.
Sometimes an element with a high z-index still appears underneath another element because they belong to different stacking contexts.
This is one of the most frustrating CSS issues for beginners.
You do not need full mastery yet, but remember:
- z-index is not always globally simple
- parent elements can affect stacking behavior
- transforms and positioned ancestors can create unexpected layering situations
Simple beginner debugging rule
If z-index is not working:
- Check whether the element has a positioning value like
relativeorabsolute - Check whether a parent creates a stacking context
- Check whether another overlapping element is in a different stacking context
- Inspect the parent structure, not just the single element
How all of these concepts connect to GSAP and Glaze
Now let’s connect the CSS fundamentals directly to animation tools.
With GSAP
GSAP commonly animates:
xyscalerotationopacityclip-like reveal setups through CSS structure- timing and sequencing
But GSAP depends on CSS for:
-
Selecting the right element
- classes and IDs
-
Understanding element relationships
- nesting and hierarchy
-
Knowing how the element behaves in layout
- display types
-
Establishing reference points
- positioning
-
Clipping animation visually
- overflow
-
Moving and resizing smoothly
- transform
-
Defining pivot behavior
- transform origin
-
Layering elements correctly
- z-index
Without these, GSAP animation becomes trial-and-error.
With them, GSAP becomes logical.
With Glaze
Because Glaze simplifies GSAP usage, it can feel “easier” at first — and it is easier in many cases.
But Glaze still relies on the same underlying browser behavior.
So even if Glaze lets you apply animation more simply, you still need to understand:
- why an element is not visible
- why movement gets clipped
- why an item overlaps incorrectly
- why a reveal effect leaks out of its container
- why scale comes from the wrong point
So this CSS knowledge is just as important with Glaze as with raw GSAP.
A simple real-world example combining many concepts
Let’s imagine a card with an image and title animation.
HTML
<div class="card">
<div class="card-image-wrap">
<img class="card-image" src="image.jpg" alt="">
</div>
<h3 class="card-title">Project Title</h3>
</div>
CSS
.card {
position: relative;
}
.card-image-wrap {
overflow: hidden;
}
.card-image {
display: block;
width: 100%;
transform-origin: center center;
}
.card-title {
position: relative;
z-index: 2;
}
GSAP idea
gsap.from(".card-image", {
scale: 1.2,
duration: 1.2
});
gsap.from(".card-title", {
y: 30,
opacity: 0,
duration: 0.8
});
What CSS concepts are involved here?
-
Classes
.card,.card-image,.card-title
-
Nesting and hierarchy
- image is inside image wrapper
- wrapper is inside card
-
Display
- image is
display: block
- image is
-
Positioning
- card and title can participate in layering
-
Overflow
- image wrapper clips scaled image
-
Transform
- image scales
- title moves with
y
-
Transform origin
- image scales from center
-
Z-index
- title stays above visual content if needed
This is why CSS fundamentals are the base of motion design on the web.
Practical beginner rules you should remember ✅
If you remember nothing else from this lesson, remember these:
-
Use classes for most animation targets
- They are reusable and flexible.
-
Use IDs only for truly unique elements
- Don’t overuse them.
-
Always pay attention to parent-child structure
- Animation behavior often depends on wrappers.
-
Know the display type of the element
- Especially for text, spans, flex items, and hidden elements.
-
Use CSS positioning to define spatial relationships
- Especially
relativeon parents andabsoluteon children.
- Especially
-
Check overflow when something is clipped or leaking
- This is one of the most common issues.
-
Use transforms for movement and scaling
- This is the heart of smooth GSAP animation.
-
Set transform origin intentionally
- Especially for scaling and rotation.
-
Use z-index carefully when things overlap
- And remember that stacking contexts exist.
Typical animation debugging checklist 🛠️
When an animation doesn’t behave correctly, ask:
-
Am I targeting the correct element?
- Class or ID typo?
- Wrong selector?
-
Is the element nested inside a parent affecting it?
- Wrapper issue?
- Wrong hierarchy?
-
What is its display type?
- Is it inline when it should be inline-block or block?
- Is it
display: none?
-
Is positioning affecting placement?
- Does the child need an ancestor with
position: relative?
- Does the child need an ancestor with
-
Is overflow clipping the animation?
- Or should overflow be hidden and currently isn’t?
-
Am I animating transform-related properties?
- Better than top/left in many cases.
-
Is transform origin correct?
- Is it growing, rotating, or revealing from the right point?
-
Is z-index or stacking context the real problem?
- Is it behind something else?
This checklist alone will save you a lot of time.
Final summary
These CSS concepts are not “extra theory.” They are the practical mechanics behind animation.
GSAP gives you powerful control over motion.
Glaze gives you simpler ways to apply that motion.
But CSS determines:
- what the element is
- where it is
- how it behaves
- how it is clipped
- how it moves
- where it pivots
- what sits in front
So if you want to become confident with GSAP and Glaze, mastering these CSS basics is one of the smartest things you can do first.
2.5 The most important JavaScript concepts you need first 🚀
Before GSAP becomes intuitive, you need a small set of JavaScript ideas that appear in almost every animation setup. The good news: you do not need to become a full JavaScript developer first. You mainly need to understand:
- what JavaScript does in the browser,
- how to store values,
- how to group actions into functions,
- how to find elements on the page,
- how to react to user actions or browser actions,
- and how to make sure your code runs at the right time.
This section is designed specifically for your use case: WordPress + BricksBuilder + future GSAP/Glaze work.
2.5.1 What JavaScript does in the browser
JavaScript is the language that gives a web page behavior.
If HTML is the structure of the page and CSS is the appearance, then JavaScript is the logic and interaction layer.
A simple way to think about it
Imagine a website as a stage:
- HTML creates the stage, actors, and props
- CSS decides how everything looks
- JavaScript tells things when to move, change, react, appear, disappear, animate, or respond
GSAP itself is a JavaScript animation library. That means GSAP does not replace JavaScript—it works through JavaScript.
What JavaScript can do in the browser
JavaScript can:
-
Find elements on the page
- Example: find a heading, button, image, section, or card
-
Change content
- Example: update text, numbers, labels
-
Change styles
- Example: set opacity, width, color, transforms
-
Add or remove classes
- Example: activate a menu, highlight a selected tab
-
React to events
- Example: click, hover, scroll, page load, resize
-
Run animations
- Example: fade in a section, move a box, stagger cards
-
Read information from the page
- Example: current scroll position, element size, form values
-
Coordinate timing
- Example: wait 1 second, then animate another element
Why this matters for GSAP
When you write GSAP code, you usually do something like this:
- select an element,
- wait until the page is ready,
- then animate that element.
That means GSAP code is often sitting inside regular JavaScript structure.
For example:
<script>
gsap.to(".box", {
x: 200,
duration: 1
});
</script>
Even if the animation itself is simple, there are already several JavaScript concepts involved:
gsap.to(...)is a function call".box"is a selector string{ x: 200, duration: 1 }is an object containing settings
You do not need to master every advanced JavaScript topic right away. But you do need to become comfortable reading this kind of code.
2.5.2 Variables in simple terms
A variable is a named container for a value.
Think of it like a labeled box.
- You give the box a name
- You put a value into it
- Later, you can use that value again
Why variables matter
In animation work, variables help you store:
- selected elements
- distances
- durations
- colors
- settings
- values you want to reuse
Instead of writing the same thing again and again, you store it once.
Simple example
let name = "Peter";
This means:
- create a variable called
name - store the text
"Peter"inside it
Then you can use it:
let name = "Peter";
console.log(name);
Common kinds of values
1. Text
let title = "Welcome";
Text values use quotes.
2. Numbers
let duration = 1.5;
let distance = 200;
Numbers do not use quotes.
3. True or false
let menuOpen = true;
let animationFinished = false;
These are called booleans.
4. Elements
You can also store HTML elements in variables:
let button = document.querySelector(".my-button");
This is extremely common in GSAP setups.
let, const, and var in simple language
You will mostly see three ways of creating variables:
letconstvar
For modern web work, focus mainly on:
-
let- use this when the value may change
-
const- use this when the value should stay the same
-
var- older style; you may still see it, but usually prefer
letorconst
- older style; you may still see it, but usually prefer
Example with let
let count = 1;
count = 2;
This is allowed because let variables can be reassigned.
Example with const
const title = "Hello";
This is good when the variable should not point to a new value later.
For example, if you select an element and do not plan to replace it, const is often a good choice:
const box = document.querySelector(".box");
A practical animation-style example
const box = document.querySelector(".box");
const moveDistance = 200;
const animationTime = 1;
gsap.to(box, {
x: moveDistance,
duration: animationTime
});
Here:
boxstores the selected elementmoveDistancestores how far it should moveanimationTimestores the duration
This makes your code easier to read.
Why variables are useful in BricksBuilder projects
When working in Bricks, you often have repeated sections, reusable classes, and structured page parts. Variables help you avoid messy code.
For example:
const cards = document.querySelectorAll(".feature-card");
const duration = 0.8;
Now you can reuse those values later.
This becomes especially helpful when:
- testing animations,
- changing settings,
- adjusting timing,
- targeting multiple sections.
Naming variables well
Good variable names make animation code much easier to understand.
Bad names
let x = 200;
let a = document.querySelector(".box");
These are vague.
Better names
const box = document.querySelector(".box");
const moveDistance = 200;
Now the meaning is obvious.
Useful naming tips
- use names that describe the value
- use English words consistently
- avoid very short names unless the meaning is obvious
- use
camelCase
Examples of camelCase:
heroTitlescrollDistanceanimationDuration
A small mental model
When you see code like this:
const heading = document.querySelector(".hero-title");
read it in plain language as:
“Create a constant called
headingand store the page element with class.hero-titleinside it.”
That is enough understanding for now.
2.5.3 Functions in simple terms
A function is a reusable block of code that performs a task.
Think of a function as a named instruction set.
Instead of writing the same steps again and again, you put them into a function and run it when needed.
Why functions matter for animation
Functions are used constantly in animation work:
- start an animation
- reset an animation
- animate all cards
- react to a click
- run something after the page loads
- handle scroll or resize logic
Simple function example
function sayHello() {
console.log("Hello");
}
This defines the function.
But it does not run yet.
To run it, you call it:
sayHello();
How to read this
function sayHello() {
console.log("Hello");
}
means:
- create a function named
sayHello - when this function runs, log
"Hello"
A more practical example
function animateBox() {
gsap.to(".box", {
x: 200,
duration: 1
});
}
This creates a function called animateBox.
It will animate .box when called:
animateBox();
This is useful because you can now trigger that same animation:
- on page load,
- on click,
- after a delay,
- or in response to some other event.
Functions can take input
Sometimes a function should work with different values. That is where parameters come in.
function moveBox(distance) {
gsap.to(".box", {
x: distance,
duration: 1
});
}
Now you can call it with different values:
moveBox(100);
moveBox(300);
How to understand this
distanceis a placeholder- when the function runs, the actual value replaces it
This is powerful because it makes your code reusable.
Why functions help you avoid repetition
Without functions:
gsap.to(".box", { x: 200, duration: 1 });
gsap.to(".box", { x: 200, duration: 1 });
gsap.to(".box", { x: 200, duration: 1 });
With a function:
function animateBox() {
gsap.to(".box", {
x: 200,
duration: 1
});
}
animateBox();
animateBox();
animateBox();
You define the logic once and reuse it.
Functions and events often work together
A very common pattern is:
- define a function,
- attach it to an event.
Example:
function openMenuAnimation() {
gsap.to(".menu", {
opacity: 1,
y: 0,
duration: 0.5
});
}
document.querySelector(".menu-button").addEventListener("click", openMenuAnimation);
This means:
This pattern is everywhere in JavaScript and GSAP work.
Function expressions and arrow functions
You may also see functions written in different styles.
Function declaration
function animateBox() {
console.log("animate");
}
Function expression
const animateBox = function() {
console.log("animate");
};
Arrow function
const animateBox = () => {
console.log("animate");
};
For now, you do not need to deeply worry about the differences. Just know that they all define functions.
In modern examples, especially with event listeners and shorter code, arrow functions are common.
Example:
document.querySelector(".button").addEventListener("click", () => {
gsap.to(".box", {
x: 200,
duration: 1
});
});
This means:
A beginner-friendly recommendation
At your current stage, try to become comfortable with:
-
regular functions
function animateBox() { gsap.to(".box", { x: 200, duration: 1 }); } -
simple arrow functions in event listeners
button.addEventListener("click", () => { animateBox(); });
That is enough to build a strong foundation.
2.5.4 Selecting elements from the page
Before you can animate something, JavaScript must be able to find it.
This is one of the most important concepts in all browser-based animation work.
If JavaScript cannot correctly select the element, GSAP cannot animate it.
The DOM in simple terms
When a browser loads your page, it turns the HTML into a structured representation called the DOM.
DOM stands for Document Object Model.
You do not need the full technical definition. Just think:
The DOM is JavaScript’s way of seeing and working with the page.
So if your HTML contains:
<h1 class="hero-title">Welcome</h1>
JavaScript can find that element and do things to it.
The most common selection methods
The most important ones for you are:
document.querySelector()document.querySelectorAll()
These two are enough for a lot of real-world work.
querySelector()
This finds the first matching element.
Example:
const title = document.querySelector(".hero-title");
This means:
- look through the document
- find the first element with class
hero-title - store it in
title
You can then use it:
gsap.to(title, {
y: 50,
opacity: 0,
duration: 1
});
querySelectorAll()
This finds all matching elements.
Example:
const cards = document.querySelectorAll(".card");
Now cards is a collection of all elements with the class .card.
This is very useful for repeated elements like:
GSAP can often work directly with multiple elements:
gsap.from(".card", {
opacity: 0,
y: 30,
duration: 0.8,
stagger: 0.2
});
or with the selected collection:
gsap.from(cards, {
opacity: 0,
y: 30,
duration: 0.8,
stagger: 0.2
});
How selectors work
Selectors in JavaScript use the same logic you may know from CSS.
Select by class
document.querySelector(".box");
The dot . means class.
Select by ID
document.querySelector("#main-button");
The hash # means ID.
Select by tag
document.querySelector("section");
This selects the first <section>.
More specific selector
document.querySelector(".hero .button");
This means:
find a .button inside .hero.
Why classes are often best for animation
In WordPress and BricksBuilder, classes are usually the best animation targets because:
- they are reusable,
- they fit well with component-based building,
- they are cleaner than relying on deeply nested structures,
- they are easier to maintain.
For example, instead of selecting:
document.querySelector("section div div h2");
it is better to assign a clear class like:
<h2 class="feature-title">Fast performance</h2>
and then use:
document.querySelector(".feature-title");
This is much more reliable.
What happens if nothing is found
Sometimes the selector does not match anything.
Example:
const box = document.querySelector(".box");
console.log(box);
If there is no .box, the result is null.
That matters because if you then try to use it incorrectly, errors can happen.
A safer pattern is:
const box = document.querySelector(".box");
if (box) {
gsap.to(box, {
x: 200,
duration: 1
});
}
This means:
- if
boxexists, - run the animation
This is especially useful in WordPress where not every page contains the same elements.
Selecting multiple elements in real projects
Example HTML:
<div class="card">Card 1</div>
<div class="card">Card 2</div>
<div class="card">Card 3</div>
JavaScript:
const cards = document.querySelectorAll(".card");
console.log(cards);
This gives you all three cards.
With GSAP:
gsap.from(cards, {
opacity: 0,
y: 40,
duration: 0.8,
stagger: 0.15
});
This is a typical pattern for animating repeated UI elements.
Selecting inside a specific section
Sometimes you do not want all matching elements across the entire page. You only want those inside a specific area.
Example:
const section = document.querySelector(".pricing-section");
const buttons = section.querySelectorAll(".button");
This means:
- first find
.pricing-section - then inside it find all
.buttonelements
This is helpful for more precise control.
2.5.5 Events in simple terms
An event is something that happens in the browser.
JavaScript can listen for events and react to them.
This is the basis of interactive websites.
Common events
Some very common events are:
clickmouseentermouseleavescrollresizesubmitDOMContentLoaded
For animation work, click, hover, scroll, and page-load events are especially important.
Event example: click
Suppose you have a button:
<button class="animate-button">Animate</button>
<div class="box"></div>
You can listen for a click:
const button = document.querySelector(".animate-button");
button.addEventListener("click", () => {
gsap.to(".box", {
x: 200,
duration: 1
});
});
How to read this
This is one of the most common JavaScript patterns you will ever use.
What addEventListener() means
This method tells the browser:
“When this specific thing happens to this specific element, run this code.”
Basic structure:
element.addEventListener("eventName", functionToRun);
Example:
button.addEventListener("click", animateBox);
or:
button.addEventListener("click", () => {
animateBox();
});
Hover-style events
mouseentermouseleave
Example:
const card = document.querySelector(".card");
card.addEventListener("mouseenter", () => {
gsap.to(card, {
y: -10,
duration: 0.3
});
});
card.addEventListener("mouseleave", () => {
gsap.to(card, {
y: 0,
duration: 0.3
});
});
This creates a simple hover motion.
Scroll events
JavaScript can also react to scrolling.
Example:
window.addEventListener("scroll", () => {
console.log("Scrolling");
});
However, for many scroll-based animations, GSAP ScrollTrigger is usually a better and more powerful solution than manually handling scroll events yourself.
Still, understanding that scroll is just another event is useful.
Form submit events
If a form is submitted, JavaScript can react:
const form = document.querySelector(".contact-form");
form.addEventListener("submit", () => {
console.log("Form submitted");
});
This is less central to GSAP itself, but it helps you understand the broader event model.
The event object
Sometimes the browser provides information about the event.
Example:
button.addEventListener("click", (event) => {
console.log(event);
});
The event object can contain details about what happened.
For your current animation learning stage, you do not need to go deep into this yet. Just know that it exists and is sometimes useful.
Why events matter so much for GSAP
A lot of animation logic is event-driven:
- on page load, animate the hero
- on click, open the menu
- on hover, lift a card
- on scroll, reveal sections
- on resize, recalculate animation values
So even though GSAP is the animation engine, JavaScript events often decide when animations begin.
2.5.6 Running code after the page is loaded
This is a very important concept, especially for beginners.
Sometimes JavaScript tries to select or animate elements before they exist in the DOM. If that happens, your code may fail or behave unpredictably.
So you often need to wait until the page is ready enough before running your code.
Why timing matters
Suppose your script runs too early:
const box = document.querySelector(".box");
console.log(box);
If .box has not been parsed yet, box may be null.
Then animation code based on it will not work.
The most common solution: DOMContentLoaded
A very common pattern is:
document.addEventListener("DOMContentLoaded", () => {
const box = document.querySelector(".box");
if (box) {
gsap.to(box, {
x: 200,
duration: 1
});
}
});
What this means
- wait until the HTML has been loaded and parsed
- then run the code
This is often enough for many animation setups.
Why this is useful in WordPress and BricksBuilder
In WordPress page builders, content is often generated dynamically through the builder and template structure. That means you want to be careful that your JavaScript runs only after the relevant markup is available.
Using DOMContentLoaded gives you a safer starting point.
Difference between page loaded and DOM ready
There is an important distinction:
DOMContentLoaded
Runs when the HTML is parsed and the DOM is ready.
Full page load
This waits for additional resources too, such as:
- images
- stylesheets
- iframes
- other external assets
A full page load listener looks like this:
window.addEventListener("load", () => {
console.log("Everything is fully loaded");
});
When to use which
Use DOMContentLoaded when
- you mainly need the HTML structure to exist
- you want to select elements and start many normal animations
Use load when
- your animation depends on exact image sizes
- you need all resources fully loaded first
- layout calculations require complete assets
For many beginner GSAP setups, DOMContentLoaded is the better default.
Another common approach: putting scripts at the end of the page
Traditionally, developers often placed scripts just before </body> so the HTML would already be loaded when the script ran.
Example:
<body>
<div class="box"></div>
<script>
const box = document.querySelector(".box");
gsap.to(box, {
x: 200,
duration: 1
});
</script>
</body>
This can work because the .box already exists by the time the script runs.
However, in WordPress and Bricks contexts, scripts may be injected through theme settings, custom code areas, or enqueued files, so relying only on script placement is not always the clearest or safest method for a beginner. Using an explicit load-ready pattern is often easier to reason about.
A good beginner pattern
This is a solid foundational structure:
document.addEventListener("DOMContentLoaded", () => {
const heroTitle = document.querySelector(".hero-title");
const heroButton = document.querySelector(".hero-button");
if (heroTitle) {
gsap.from(heroTitle, {
y: 40,
opacity: 0,
duration: 1
});
}
if (heroButton) {
gsap.from(heroButton, {
y: 20,
opacity: 0,
duration: 1,
delay: 0.3
});
}
});
This is good because it:
- waits for the DOM,
- selects elements,
- checks if they exist,
- animates them safely.
This pattern is very relevant for real websites.
Putting it all together
Now let us combine all six concepts into one small example.
Example HTML
<button class="animate-button">Animate Box</button>
<div class="box"></div>
Example JavaScript
document.addEventListener("DOMContentLoaded", () => {
const button = document.querySelector(".animate-button");
const box = document.querySelector(".box");
const moveDistance = 200;
function animateBox() {
gsap.to(box, {
x: moveDistance,
duration: 1
});
}
if (button && box) {
button.addEventListener("click", () => {
animateBox();
});
}
});
What is happening here
-
Running after page load
- The code waits for
DOMContentLoaded
- The code waits for
-
Selecting elements
- It finds the button and the box
-
Variables
- It stores elements and the distance in variables
-
Functions
- It creates a function called
animateBox
- It creates a function called
-
Events
- It listens for a click on the button
-
Browser behavior
- When clicked, JavaScript runs the animation through GSAP
This is a very realistic mini-pattern that mirrors how many real interactive animations are built.
A GSAP-oriented mental framework
As you continue learning, try to read many animation setups using this simple formula:
- Wait until the page is ready
- Select the element or elements
- Store what you need in variables
- Write a function if the logic should be reusable
- Trigger it with an event or run it immediately
- Animate with GSAP
That is the basic rhythm of a lot of frontend animation work.
Common beginner mistakes to watch for ⚠️
1. Trying to animate an element that does not exist
const box = document.querySelector(".box");
gsap.to(box, { x: 200 });
If .box is missing, this is a problem.
Better:
if (box) {
gsap.to(box, { x: 200 });
}
2. Forgetting the dot for class selectors
Wrong:
document.querySelector("box");
Correct:
document.querySelector(".box");
3. Using quotes around numbers accidentally
Not ideal:
let duration = "1";
Better:
let duration = 1;
For animation settings, numbers should usually be actual numbers.
4. Defining a function but forgetting to call it
function animateBox() {
gsap.to(".box", { x: 200 });
}
This does nothing until you call:
animateBox();
5. Running code too early
If the DOM is not ready, selectors may fail.
Safer:
document.addEventListener("DOMContentLoaded", () => {
// your code here
});
What you should be able to do after this section
After understanding this section, you should be able to:
- explain what JavaScript does on a webpage,
- read and create simple variables,
- understand simple functions,
- select elements with
querySelectorandquerySelectorAll, - attach a click event with
addEventListener, - safely run JavaScript after the DOM is ready.
That is already a very important foundation for GSAP.
Mini cheat sheet 🧠
Select one element
const box = document.querySelector(".box");
Select many elements
const cards = document.querySelectorAll(".card");
Create a variable
const distance = 200;
Create a function
function animateBox() {
gsap.to(".box", {
x: 200,
duration: 1
});
}
Run a function on click
button.addEventListener("click", animateBox);
Run code after DOM is ready
document.addEventListener("DOMContentLoaded", () => {
// code here
});
Why this matters specifically for Glaze too
Even though Glaze simplifies animation setup, the same browser fundamentals still matter.
You still need to understand:
- what element you are targeting,
- when the page is ready,
- what event may trigger something,
- how JavaScript connects behavior to markup.
So learning these basics is not “extra theory”—it directly supports both:
- GSAP as the powerful engine
- Glaze as the easier abstraction
2.6 How Animation Can Fail Because of Layout, Not Because of GSAP 🧱✨
This is one of the most important lessons in learning animation for the web:
An animation can be technically correct in GSAP and still look broken, janky, invisible, misaligned, or “wrong” because the real problem is the page layout.
In other words:
- GSAP controls values over time
- CSS controls how elements are displayed
- HTML structure controls what can move, where, and relative to what
- The browser layout engine decides the final visual result
So if an element is inside the wrong container, clipped by overflow, affected by flex behavior, mispositioned by transforms, or measured before images/fonts load, then GSAP may be doing exactly what you asked—but the browser’s layout rules create a result you did not expect.
Why this matters especially in WordPress and BricksBuilder
In WordPress, BricksBuilder, and visual builders in general, you often animate elements that are:
- inside several nested wrappers,
- affected by builder-generated CSS,
- inside sections/containers with
overflow: hidden, - aligned with flex or grid,
- already transformed by styles,
- lazy-loaded or dynamically rendered,
- influenced by responsive rules you did not write manually.
So when an animation “fails,” many people think:
- “GSAP is buggy”
- “ScrollTrigger is inconsistent”
- “the tween is wrong”
But often the real issue is:
- the element is in the wrong positioning context,
- its width/height is unstable,
- it is clipped,
- its movement changes the layout in unwanted ways,
- or its coordinates are being calculated relative to something different than expected.
The core principle
A browser lays out the page first, then paints it, then compositing may occur.
GSAP usually animates properties such as:
xyscalerotationopacityclip-pathwidthheighttopleft
But not all properties behave equally.
There is a huge difference between:
- animating visual movement
- animating layout-affecting properties
For example:
transform: translateX(...)usually moves something visuallyleft,top,width,height,marginoften affect layout calculations
That means two animations can look similar to you, but the browser experiences them very differently.
1. Layout vs visual transform: the first big distinction
Visual movement with transforms
When you animate:
gsap.to(".box", { x: 200, duration: 1 });
GSAP usually applies a CSS transform like:
transform: translateX(200px);
This often feels smooth because:
- the element is visually moved,
- surrounding elements usually do not need to reflow,
- the browser can often handle this more efficiently.
The element looks moved, but its original layout slot still exists.
That means:
- other elements usually do not shift out of the way,
- the document flow usually remains the same,
- it may overlap neighbors.
This is often desirable for animation.
Layout movement with top/left/margin/width
If instead you animate:
gsap.to(".box", { left: 200, duration: 1 });
this only works meaningfully if the element has a positioning mode such as:
position: relative;
or
position: absolute;
And animating left may trigger layout recalculations.
Similarly:
gsap.to(".box", { width: 500, duration: 1 });
can cause:
- text rewrapping,
- neighboring items shifting,
- container heights changing,
- scrollbars appearing/disappearing,
- layout jumps.
So if the animation appears “jerky” or causes strange page movement, the issue may not be GSAP. It may be that you are animating a layout-sensitive property.
Practical takeaway
When possible, prefer animating:
x,yscalerotationopacity
Be more careful when animating:
widthheighttopleftmarginpaddinggap- anything that causes reflow
2. The most common layout reasons animations seem broken
2.1 Overflow clipping
A very common situation:
- you animate an element upward, sideways, or from outside the viewport,
- but its parent has:
Result:
- the moving element gets clipped,
- part of it disappears,
- it looks like the animation is not working.
Example
You want a card to slide in from the left:
gsap.from(".card", { x: -200, opacity: 0, duration: 1 });
But the parent container has:
Then the card may be invisible until it enters the parent’s visible bounds.
That is not GSAP failing. That is the layout container masking its child.
In BricksBuilder
This happens often when:
- sections,
- containers,
- sliders,
- query loop wrappers,
- hero wrappers
have overflow settings applied for design reasons.
What to check
- Inspect the animated element.
- Look at its parent and grandparent.
- Check whether any ancestor has:
overflow: hiddenoverflow: clip- fixed height with content moving outside
- Temporarily disable overflow and test again.
2.2 The element is moving relative to a different container than you think
This is very common with position: absolute.
Suppose you animate an absolutely positioned element:
.badge {
position: absolute;
top: 0;
left: 0;
}
Where is top: 0; left: 0; measured from?
It is measured from the nearest ancestor that establishes the positioning context, often an ancestor with:
position: relative;
If that ancestor is not the one you expected, the badge appears in a strange place.
Then you animate it with GSAP, and it moves “wrong.”
But GSAP is not wrong. The element is simply positioned relative to a different ancestor.
Example problem
You think the element is positioned relative to a card, but actually it is positioned relative to the entire section.
Then an animation like:
gsap.to(".badge", { x: 100, y: 50 });
looks offset, detached, or inconsistent.
What to check
- Which ancestor is the positioning context?
- Does the parent need
position: relative? - Is the element unexpectedly inside another wrapper generated by Bricks?
2.3 Flexbox changes the behavior you expect
Flexbox is wonderful—but for animation, it can create confusing results.
Imagine a row of items in a flex container:
display: flex;
justify-content: space-between;
align-items: center;
If you animate one child’s width, margin, or height, the browser may:
- redistribute space,
- shrink other items,
- wrap items to a new line,
- move neighboring elements.
So your animation may look unstable.
Example
gsap.to(".button", { width: 300, duration: 0.3 });
Inside a flex row, this can make:
- nearby text shift,
- icons jump,
- alignment break.
Again, GSAP is doing exactly what you requested. The issue is that flex layout is recalculating the row as width changes.
Safer alternative
Instead of animating width, animate scale:
gsap.to(".button", { scale: 1.08, duration: 0.3 });
That visually enlarges the button without forcing a major layout recalculation.
Important nuance
scale does not reserve more real layout space. So:
- it may overlap nearby items,
- it may be clipped,
- it may need extra breathing room.
So even the “better” animation still depends on layout planning.
2.4 Grid can also make animations feel inconsistent
CSS Grid can produce similar issues.
If you animate properties that affect the real dimensions of a grid item, then:
- row height may change,
- columns may rebalance,
- content may push other content,
- the entire section may jump.
This is especially obvious when cards contain different amounts of text.
Example
In a grid of cards, you animate a card’s height from 200px to 320px.
The browser may:
- change the row height,
- shift cards below,
- create a cascade of movement across the grid.
That may be exactly what the layout system should do—but visually it feels like broken animation.
2.5 Auto height is tricky
A classic issue: animating height from 0 to auto.
Many beginners encounter this and think animation is impossible or buggy.
The problem is not GSAP alone—it is that auto is not a simple fixed numeric value in layout. It depends on content, wrapping, fonts, images, and available width.
GSAP can help with this, but the layout is still the core challenge.
Why it gets messy
If the content inside changes while the animation runs, then:
- the target height may effectively change,
- text wrapping may differ by screen size,
- image loads may alter height,
- fonts may swap and change line breaks.
So the “same animation” can look different across devices or load states.
WordPress-specific reality
In builder environments:
- accordions,
- toggles,
- tabs,
- dynamic post content,
- WooCommerce product details
often include content whose final height is not stable at the moment you first animate it.
2.6 Images, fonts, and dynamic content change layout after animation setup
This is a huge real-world issue.
GSAP often measures elements at a certain moment. But if layout changes afterward, your animation setup may no longer match reality.
Example sources of delayed layout change
- images load later,
- web fonts load later,
- lazy-loaded media appears,
- AJAX content is inserted,
- accordions open,
- tabs switch,
- filters change a grid,
- CMS content varies by page.
Example symptom
A ScrollTrigger animation starts too early or too late.
You think:
- “ScrollTrigger is wrong.”
But often:
- the page height changed after trigger positions were calculated.
In practice
If an image above the trigger loads later and pushes everything downward, then the trigger’s start point shifts visually, but the previous calculation may now be outdated until refreshed.
That is a layout timing issue, not an animation logic issue.
2.7 Existing transforms conflict with your animation
This one is subtle and very common in builders.
An element may already have CSS such as:
transform: translateX(-50%);
often used for centering.
Then you animate:
gsap.to(".thing", { x: 100 });
Now the final visual result combines:
- the existing CSS transform,
- the GSAP transform.
This may create unexpected positions.
Why this confuses beginners
You think:
- “I only moved it 100 pixels.”
But the browser is combining transform components. If the element was already translated, scaled, or rotated, the result may not match your mental model.
Example builder cases
Builder tools frequently apply transforms for:
- centering,
- parallax effects,
- hover effects,
- prebuilt entrance effects,
- sticky adjustments.
So before animating, always check whether the element already has transforms.
2.8 Transform origin makes scaling or rotation look wrong
A scale or rotation animation may seem broken when the real issue is:
transform-origin
For example, scaling defaults around the center in many cases. But maybe you expected it to grow from the left edge.
Then the animation appears to “drift.”
Example
gsap.to(".line", { scaleX: 1, duration: 1 });
If the transform origin is centered, the line expands both left and right.
If you wanted it to draw from left to right, you need a left-side origin.
Without that, you may think the animation is behaving strangely.
But the issue is not GSAP. It is the geometry of transforms.
2.9 Hidden elements are not always measurable the way you expect
If an element is set to:
display: none;
it does not participate in layout.
That means:
- it has no visible box,
- measurement behavior changes,
- some calculations based on dimensions become impossible or misleading.
So if you try to animate from a state that is fully removed from layout, you may get surprising results.
Better mental model
There is a difference between:
- invisible but still in layout
opacity: 0visibility: hiddenin many contexts
- not in layout at all
display: none
If you need smooth animation, removing something from layout entirely is often a harder starting point.
2.10 Z-index and stacking contexts make animations appear to disappear
Sometimes an element is animating perfectly, but it seems to vanish behind another element.
This is often a stacking context issue.
Example causes
positionplusz-indextransformopacityfilter- certain CSS properties creating new stacking contexts
An element can be visually underneath another layer even though its motion is correct.
Example symptom
You animate a modal upward, but it appears partially hidden behind a header or overlay.
You think:
- “The Y animation is wrong.”
Actually:
- the modal is in a different stacking context,
- its
z-indexis losing to another layer, - or a transformed ancestor is affecting layering behavior.
2.11 Parent transforms affect child positioning and fixed elements
If a parent has a transform applied, it can change how descendants behave.
This is especially important with:
- nested animations,
- fixed-position elements,
- coordinate calculations.
For example, a transformed ancestor can alter the containing block or create a new context that changes how child movement appears.
This can make animations inside complex builder structures feel “off.”
2.12 Responsive breakpoints change the layout assumptions
An animation may look perfect on desktop and terrible on mobile.
Why?
Because the layout changed:
- columns became stacked,
- heights changed,
- text wrapped differently,
- element order changed,
- spacing changed,
- hidden elements became visible or vice versa.
If your animation assumes desktop geometry, then mobile may break that assumption entirely.
Example
A horizontal reveal:
gsap.from(".feature-image", { x: 200, opacity: 0 });
might look elegant on desktop.
But on mobile:
- the image is full width,
- the parent may clip it,
- the distance is too large,
- the content order may change,
- the image may now appear much later in the document.
The animation code may be fine. The layout context is different.
3. Typical “it’s broken” scenarios that are actually layout problems
Scenario A: “My element moves, but not from where I expect”
Likely causes:
- the element already has a transform,
transform-originis wrong,- absolute positioning is relative to the wrong ancestor,
- flex/grid alignment changes its base position.
Scenario B: “My animation is cut off”
Likely causes:
- parent has
overflow: hidden, - ancestor has fixed height,
- scaled element extends beyond its container,
- section wrapper clips child content.
Scenario C: “The animation is janky”
Likely causes:
- animating layout-heavy properties,
- images/fonts are still changing layout,
- too many elements cause reflow,
- grid/flex is recalculating during motion.
Scenario D: “ScrollTrigger starts in the wrong place”
Likely causes:
- page height changed after initialization,
- lazy-loaded content shifted layout,
- hidden tab/accordion content later expanded,
- sticky headers affect visible viewport assumptions.
Scenario E: “The element disappears during animation”
Likely causes:
- z-index issue,
- stacking context issue,
- clipping from ancestor overflow,
- opacity or visibility from another class/state,
- element moved behind another transformed layer.
4. How to diagnose whether the problem is layout or GSAP 🔍
A very useful skill is learning to ask:
“Is GSAP calculating wrong values, or is the browser layout making those values look wrong?”
Use this checklist.
Diagnostic checklist
-
Remove the animation and test the layout
Ask:
- Is the element positioned correctly before animation?
- Is it visible?
- Does it already have CSS transforms?
- Is it clipped?
- Is spacing stable?
-
Set the end state manually in CSS
If your GSAP tween moves an element to
x: 200, try manually applying a similar transform in dev tools.Ask:
- Does the element appear where you expect?
- Is it clipped or layered incorrectly?
- Does the parent container cause problems?
-
Inspect parent elements
Check:
overflowpositiondisplaytransformz-indexheightalign-itemsjustify-content
-
Check whether the element is in flex or grid
Ask:
- If width/height changes, does the whole layout recalculate?
- Would transform-based animation be safer?
-
Look for builder-generated wrappers
In BricksBuilder, the visible design may involve more wrappers than you realize.
Ask:
- Am I animating the right element?
- Should I animate the inner wrapper instead of the outer one?
- Is the builder applying extra styles to a wrapper?
-
Test with temporary debug CSS
Add temporary outlines:
.debug * { outline: 1px solid red; }This helps reveal:
- clipping boundaries,
- actual element size,
- nested wrappers,
- unexpected spacing.
-
Disable overflow temporarily
If the animation suddenly “works,” then the issue is not GSAP. It is clipping.
-
Temporarily remove flex/grid rules
If the animation becomes stable, then layout recalculation is the culprit.
-
Wait for content to load
If timing changes after images or fonts load, your issue is measurement/layout timing.
-
Refresh triggers after layout changes
Especially in scroll-based setups, if positions become correct only after refresh, the core issue was layout shifting after initial measurement.
5. The biggest CSS/layout concepts you need to understand for successful animation
You do not need to become an expert CSS engineer overnight, but these concepts are essential.
5.1 Document flow
Elements in normal flow affect each other’s position.
If one grows or moves via layout properties, others may shift.
Transforms often do not change normal flow.
That single distinction explains many animation surprises.
5.2 Positioning context
Understand the difference between:
staticrelativeabsolutefixedsticky
Especially:
- absolute children need the right positioned ancestor
- otherwise their coordinates are based on a different container than expected
5.3 Flex and grid behavior
Know that flex and grid are not just alignment tools—they are layout engines.
If you animate dimensions inside them, the engine may recalculate placement.
5.4 Overflow and clipping
If something extends beyond a container, ask whether it is allowed to remain visible.
5.5 Stacking and z-index
If an element appears hidden, always ask whether it is actually underneath another layer.
5.6 Transforms and transform-origin
Understand:
- transforms are composited visual changes,
- they may combine with existing transforms,
- the origin point changes how scale/rotation appear.
6. WordPress and BricksBuilder-specific examples
Example 1: Hero text slides in but is cut off
You animate a heading from above:
gsap.from(".hero-title", { y: -100, opacity: 0, duration: 1 });
But the hero container has hidden overflow to crop a background effect.
Result:
- the top of the heading is clipped.
Real issue
Not GSAP. The parent container is masking child overflow.
Example 2: Animated badge appears in the wrong corner
A badge is absolutely positioned on a card, but the card itself does not have position: relative.
Result:
- the badge positions relative to a larger ancestor,
- the animation looks detached from the card.
Real issue
Wrong positioning context.
Example 3: Expanding card breaks the whole row
You animate the height of a card in a three-column layout.
Result:
- row heights change,
- neighboring cards jump,
- section becomes messy.
Real issue
You are animating a layout dimension inside a structured grid/flex system.
Example 4: Scroll animation triggers too early on a page with lazy-loaded images
Everything looks fine on refresh, then later feels off.
Real issue
Content loading changed layout after trigger positions were calculated.
Example 5: Hover scale causes overlap
You scale a card:
gsap.to(".card", { scale: 1.05, duration: 0.3 });
Looks smooth—but now it overlaps adjacent cards.
Real issue
Transforms do not reserve additional layout space.
So while scale is often better for performance, the layout still must provide enough visual room.
7. A mental model that will save you time 🧠
When animation looks wrong, think in this order:
- Is the element where I think it is in the layout?
- What container is it positioned relative to?
- Is a parent clipping it?
- Am I animating layout properties or transform properties?
- Is flex/grid recalculating around it?
- Has the layout changed after the animation was initialized?
- Is another CSS rule already affecting transform, opacity, or visibility?
- Is z-index or stacking hiding the result?
Only after checking these should you assume GSAP itself is the problem.
8. Good habits to prevent layout-based animation failure
Habit 1: Animate inner wrappers when possible
Instead of animating the main layout container, animate a child inside it.
Why?
- the outer element keeps layout stable,
- the inner element provides a safe animation surface.
This is one of the smartest techniques in real projects.
Pattern
- outer wrapper controls layout
- inner wrapper gets animated
For example:
- card handles width, spacing, grid behavior
- card-inner gets
x,y,scale,opacity
Habit 2: Prefer transforms for movement
Use x/y instead of left/top where appropriate.
Use scale instead of width/height when you only need visual growth.
Habit 3: Decide intentionally whether overflow should hide or reveal
Do not let overflow behavior be accidental.
Ask:
- Should this entrance animation come from outside the box and be visible?
- Or should the container act like a mask?
Both are valid—but choose intentionally.
Habit 4: Keep positioning contexts explicit
If an absolute child belongs inside a card, often the card should explicitly have:
position: relative;
That removes ambiguity.
Habit 5: Check existing CSS before animating
Before adding GSAP, inspect:
- transform
- opacity
- visibility
- display
- position
- overflow
- z-index
Especially in BricksBuilder, styles may already be doing more than you realize.
Habit 6: Expect responsive differences
Do not assume one animation setup fits all breakpoints equally well.
Sometimes desktop and mobile need:
- different distances,
- different trigger points,
- different directions,
- or no animation at all.
Habit 7: Recalculate when layout changes
If content loads later or UI state changes significantly, animation measurements may need refreshing.
This is especially important with scroll-based logic.
9. Beginner-friendly rule of thumb
Here is a very practical summary:
If an animation feels broken, ask these three questions first
- Is the element being clipped?
- Is the element in the wrong positioning/layout context?
- Am I animating a property that changes layout instead of just visual appearance?
These three questions alone will solve a huge percentage of “GSAP problems.”
10. Simple comparison table
| Situation | Looks like a GSAP issue | Real likely cause |
|---|---|---|
| Element is cut off while moving | Tween not working | Parent overflow: hidden |
| Element starts from a weird location | Wrong x/y values |
Existing transform or wrong positioned ancestor |
| Layout jumps during animation | GSAP is janky | Width/height/margin animation causing reflow |
| Scroll trigger starts wrong | ScrollTrigger bug | Layout changed after images/fonts/content loaded |
| Scaled item overlaps neighbors | Bad animation setup | Transform does not reserve layout space |
| Element disappears behind another | Tween failed | z-index or stacking context problem |
11. What you should remember most ✅
If you remember only one thing from this lesson, remember this:
GSAP animates values. CSS layout determines what those values actually look like on the page.
So when something looks wrong:
- do not debug GSAP first,
- debug the layout context first.
In many real projects, especially in WordPress + BricksBuilder, the real craft of animation is not just writing the tween—it is creating a layout structure that is animation-friendly.
That means:
- stable wrappers,
- intentional positioning,
- conscious overflow handling,
- careful use of flex/grid,
- awareness of dynamic content,
- transform-based motion when appropriate.
12. A short practical mantra for your future work 💡
Before animating, ask yourself:
- What is this element relative to?
- Can it move without breaking layout?
- Will a parent clip it?
- Should I animate the wrapper or an inner element?
- Will this still make sense on mobile?
If you build this habit early, your GSAP work will become much easier, cleaner, and more professional.
2.7 Common beginner misunderstandings and how to avoid them
When people begin learning web animation—especially with CSS, JavaScript, GSAP, and tools like BricksBuilder or WordPress—they often assume the hardest part is “learning the syntax.”
In reality, the bigger challenge is usually this:
Beginners often misdiagnose the problem.
They think the animation tool is broken, when the real issue is often layout, selectors, timing, page lifecycle, or expectations.
This section is about those misunderstandings: what they are, why they happen, what they look like in real projects, and how to avoid them 🔍
The big idea: animation problems are often not animation problems
A lot of early frustration comes from treating animation as an isolated skill.
But animation sits on top of several other layers:
- HTML structure
- CSS layout
- CSS visibility and positioning
- JavaScript timing
- Element selection
- Page load state
- Scroll behavior
- Performance constraints
If any one of those layers is unstable, the animation can appear broken—even if your GSAP code is perfectly valid.
That is why beginners often say things like:
- “GSAP isn’t working.”
- “The element won’t animate.”
- “The fade-in is broken.”
- “ScrollTrigger is buggy.”
- “The timeline is random.”
Often, none of those statements are actually true.
Instead, what is true is something like this:
- The element was never selected.
- The element is
display: none. - The element is already transformed by CSS.
- The parent has
overflow: hiddenand clips the movement. - The animation runs before the page is ready.
- Another script overrides the same property.
- The trigger point is misunderstood.
- The layout shifts after initialization.
So the first professional mindset shift is this:
Do not immediately blame the animation library. First verify the environment in which the animation is running. ✅
Misunderstanding 1: “If I wrote the animation code, it should just work”
This is one of the most common beginner assumptions.
A new learner writes something like:
gsap.to(".card", { y: 100, opacity: 1, duration: 1 });
They expect that:
- The element exists.
- The selector matches correctly.
- The element starts in a visible state.
- The movement is noticeable.
- Nothing else interferes.
- The animation runs at the right time.
But none of those are guaranteed.
Why this misunderstanding happens
Animation code looks declarative. It feels like you are giving a direct instruction:
“Move this element.”
But the browser interprets that instruction inside a very specific context:
- Which element?
- When should it move?
- From what starting values?
- Relative to what layout?
- Is it visible?
- Is there already a transform applied?
- Has the page fully rendered?
So even “correct” code may produce no visible result.
How to avoid it
Adopt a checklist mindset whenever something does not animate:
-
Confirm the selector matches an element
- Open DevTools.
- Check whether the class or ID is actually present.
- Make sure you did not misspell it.
-
Confirm the property change is visible
- If
y: 10is too subtle, you may think nothing happened. - Test with a larger value first, like
y: 100.
- If
-
Confirm the element is visible
- If opacity is already
1, a fade-in may seem ineffective. - If the element is off-screen or behind another layer, movement may be hidden.
- If opacity is already
-
Confirm timing
- Did the animation run before the content finished rendering?
- Did it fire once on load when you expected it on scroll?
-
Confirm no conflicting CSS or JS
- Existing
transformrules can affect the result. - Another animation may overwrite the same properties.
- Existing
Professional habit
Instead of asking:
“Why is GSAP broken?”
Ask:
“Which assumption in my setup is false?”
That one shift will save you hours ⏱️
Misunderstanding 2: “If I can see the element in the builder, my selector must be correct”
This is especially common in visual builders like BricksBuilder.
A beginner sees an element visually on the page and assumes that selecting it in code is simple. But visual presence in the builder does not guarantee that your selector is valid or stable.
Common selector mistakes
- Using the wrong class name
- Forgetting the
.for classes - Forgetting the
#for IDs - Targeting a wrapper instead of the actual child element
- Using a class that exists multiple times when only one element was intended
- Using autogenerated or unstable builder classes
- Writing selectors based on guesswork instead of inspecting the actual DOM
For example, a beginner may intend to target a single heading but accidentally target every heading with the same utility class.
Why this causes confusion
The animation technically does run—but on:
- The wrong element
- Multiple elements
- No elements at all
If the selector returns no matches, there may be no visible error that feels obvious to a beginner.
How to avoid it
-
Inspect the real DOM
- Do not rely only on the builder interface.
- Use browser DevTools to inspect the final output.
-
Use intentional classes for animation
- Add classes specifically for animation targeting, such as:
.hero-title.fade-card.feature-item
- Add classes specifically for animation targeting, such as:
-
Prefer stable selectors
- Avoid depending on auto-generated classes that may change.
- Avoid selecting deeply nested structures unless necessary.
-
Test with a console check
You can verify that the browser finds your element:
console.log(document.querySelector(".hero-title")); -
Test quantity when needed
If you expect multiple items:
console.log(document.querySelectorAll(".feature-item").length);
Good rule
If your selector is vague, your debugging will be vague. 🧭
Clear naming leads to clear animation logic.
Misunderstanding 3: “The animation is broken,” when the real problem is layout
This is one of the most important lessons for beginners.
A huge number of animation problems are actually layout problems.
Examples of layout-related issues
- The element moves, but the parent has
overflow: hidden, so the movement is clipped. - The element fades in, but it sits behind another layer because of
z-index. - The element shifts horizontally, but its container width causes wrapping.
- The element scales up, but transform origin makes it appear to jump.
- The element is absolutely positioned and not where the learner thinks it is.
- A sticky or fixed element behaves differently during scroll animation.
- The page reflows as images load, changing trigger positions.
Why beginners blame animation first
Animation is the visible feature being worked on, so it gets blamed first.
But the browser does not animate in a vacuum. It animates whatever the layout system gives it.
If the layout is unstable, your animation is operating on unstable ground.
How to avoid it
-
Learn enough CSS to debug movement
The most important concepts are:
- Classes
- IDs
- Nesting and hierarchy
- Display types
- Positioning basics
- Overflow
- Transform
- Transform origin
- Z-index
-
Temporarily simplify the situation
If an animation looks wrong:
- Remove extra wrappers.
- Remove unnecessary transforms.
- Disable overflow rules temporarily.
- Test the element in a simpler container.
-
Use obvious values while debugging
A tiny shift can be hard to notice. Use:
- Large
xoryvalues - Strong opacity changes
- Longer durations
- Large
-
Check stacking and clipping
If movement is cut off:
- Inspect parent containers
- Look for
overflow: hidden - Check
positionandz-index
A useful mental model
Think of animation as changing properties over time.
If the property is valid but the layout context hides or distorts the result, then the animation is not the issue—the presentation context is.
Misunderstanding 4: “Opacity 0 means hidden, so that’s enough”
Beginners often use opacity: 0 and assume the element is fully gone in every meaningful way.
That is not true.
An element with opacity: 0 is usually still:
- In the document flow
- Taking up space
- Potentially clickable
- Still present for layout calculations
Why this matters
Suppose you want a staggered entrance animation. You set all items to opacity: 0. You may expect them to behave as though they are absent until revealed.
But they may still affect spacing and interactions.
Related confusion
Beginners often mix up:
opacity: 0visibility: hiddendisplay: none
These are not equivalent.
Simplified distinction
-
opacity: 0- Invisible visually
- Still occupies layout space
- Often still exists for interactions unless otherwise handled
-
visibility: hidden- Hidden visually
- Still occupies layout space
- Generally not interactable in the same way
-
display: none- Removed from layout flow
- No visible rendering
- Cannot animate into view in the same direct way without changing layout state
How to avoid it
Use the right hiding strategy for the effect you want:
- Use opacity + transform for smooth entrances.
- Use visibility when you need hidden-but-reserved space behavior.
- Be careful with display: none if you want smooth animation.
Practical beginner advice
If you are creating reveal animations, a common pattern is:
-
Start with:
- lower opacity
- shifted position
- maybe slightly scaled
-
Animate to:
- full opacity
- natural position
- normal scale
This often gives a more natural result than relying on opacity alone ✨
Misunderstanding 5: “Transforms move the layout”
Beginners often expect transform: translateY(...) to behave like changing margin, padding, or top/left in normal flow.
But transforms usually affect visual rendering, not the element’s layout footprint in the same way.
Why this is confusing
An element may appear to move down, but surrounding elements do not reflow around it.
That can feel “wrong” unless you understand what transforms do.
What beginners often expect
They think:
- If the element moves down visually, other elements should move too.
- If an item slides in from the left, the layout should expand around it.
- If something is scaled up, the container should resize automatically.
Usually, transforms do not work like that.
Why animation tools prefer transforms
Libraries like GSAP often animate transforms because they are:
- More performant
- Smoother
- Better suited for motion
- Less likely to trigger expensive layout recalculations
How to avoid confusion
Understand the difference between:
-
Layout properties
- width
- height
- margin
- top/left in some contexts
- display-related changes
-
Transform properties
xyscalerotation
A transform changes where the element appears, not necessarily how surrounding elements are laid out.
Practical takeaway
If you want smooth motion, animate transforms. If you want structural layout changes, understand that you are solving a different problem.
Misunderstanding 6: “From” animations are always better because they define the start state
Beginners often love from() animations because they feel intuitive:
“Start here, then animate to the natural state.”
That can work very well—but it also creates confusion if the initial state is not handled carefully.
Why from() can be tricky
A from() animation says:
- Pretend the element starts with these values
- Then animate to whatever the current values are
That means the final result depends on the current computed state of the element.
If the current state changes because of CSS, media queries, responsive layout, or another script, your animation outcome may change too.
Common beginner issues
- Flash of unstyled content before animation starts
- Unexpected jumps on page load
- Elements appearing in the wrong starting state
- Conflicts with inline styles or existing transforms
How to avoid it
-
Be intentional about initial states
- If the element must be hidden before animation, make sure that state is managed consistently.
-
Use
fromTo()when clarity mattersIf both start and end values should be explicit,
fromTo()can reduce ambiguity. -
Watch for load timing
If the animation starts after the element briefly appears in its end state, users will see a flash.
Conceptual lesson
from() is not “bad.” It is just less explicit than many beginners realize.
Sometimes less code feels easier, but more explicit control is actually safer.
Misunderstanding 7: “If it worked once, the setup must be correct”
A beginner may test the page, see the animation run once, and assume the setup is solid.
But one successful run does not prove reliability.
Why this is dangerous
Animations can appear to work while still having hidden problems:
- They only work after a hard refresh
- They fail on mobile
- They break when content length changes
- They misfire when the page loads slowly
- They only work in the builder preview
- They fail when reused on another section
What this reveals
The code may be incidentally functional, not robustly designed.
How to avoid it
Test animations under different conditions:
- Refresh normally
- Refresh with cache disabled
- Resize the browser
- Test on mobile
- Test with slower network conditions
- Test with different amounts of content
- Test on the live page, not only in the builder
Professional standard
Do not ask only:
“Did it work?”
Also ask:
“Will it keep working when the context changes?” 🧠
That is the difference between a demo and an implementation.
Misunderstanding 8: “Scroll animation means the animation should start whenever I can see the element”
This is one of the most common misunderstandings with scroll-triggered animation.
Beginners often assume the browser has a human-like concept of “when the element becomes visible.”
But scroll systems operate using defined trigger positions, not intuition.
Why this creates confusion
You may think:
- “The element is on screen, so why hasn’t it animated?”
- “It triggered too early.”
- “It triggered too late.”
- “It triggered when only part of it was visible.”
This usually means the trigger logic is different from what you imagined.
The real lesson
Scroll-based animation depends on:
- The trigger element
- The viewport
- The configured start and end positions
- The page layout height
- Recalculations after layout changes
How to avoid it
-
Learn trigger language carefully
Understand that trigger systems use reference points, not vague visibility.
-
Use visual debugging tools
Markers are extremely helpful when learning scroll animation.
-
Test on real page heights
Trigger behavior can feel different on short vs. long pages.
-
Watch for layout shifts
Images, fonts, accordions, and dynamic content can change the page after initialization.
Beginner-safe mindset
If a scroll trigger feels wrong, first verify the trigger math and layout—not just the animation settings. 📏
Even though this is not advanced mathematics, the logic is still positional and relational.
You are effectively working with changing distances between elements and the viewport over time.
Misunderstanding 9: “The page loaded, so my animation code definitely ran at the right time”
This is a very common JavaScript misunderstanding.
Beginners often think page rendering is a single event:
- The page appears
- Everything exists
- Animation can run safely
In practice, page readiness can be more complicated.
Why this matters
Your animation may initialize before:
- The targeted element exists
- Images have affected layout
- Fonts have changed text dimensions
- Dynamic content has been inserted
- Builder-generated markup has finished rendering in the way you expect
Resulting symptoms
- Selectors return nothing
- Trigger positions are inaccurate
- Elements jump after initialization
- Measurements are taken too early
How to avoid it
-
Run code after the appropriate load stage
The key beginner concept is not memorizing every browser event, but understanding that timing matters.
-
Check whether the element exists before animating
Defensive checks prevent confusion.
-
Refresh or recalculate when layout changes
This is especially important with scroll-based systems.
-
Be careful in CMS and builder environments
WordPress and visual builders can introduce timing complexity.
Core principle
Animation timing is not just about duration and delay. It is also about when your script enters the page lifecycle.
That is a concept beginners often overlook.
Misunderstanding 10: “More animation makes the site feel more professional”
This is a very understandable mistake.
When beginners first discover animation tools, they often want to animate everything:
- Every section fades in
- Every card slides upward
- Every button scales on hover
- Every heading staggers word by word
- Every image parallaxes
- Every scroll moment triggers something
At first, this feels exciting.
But overuse quickly creates the opposite effect.
Why this happens
Animation is impressive because it adds motion and attention. So beginners assume:
More motion = more polish
In professional work, that is often false.
Too much animation can make a site feel:
- Slow
- Distracting
- Repetitive
- Unclear
- Gimmicky
- Fatiguing
How to avoid it
-
Use animation to support hierarchy
Animate what matters most:
- Primary entrances
- Important interactions
- Key moments of emphasis
-
Vary intensity
Not every element needs the same treatment.
-
Favor subtlety
Professional interfaces often use restrained motion.
-
Ask what purpose the animation serves
Good reasons include:
- Guiding attention
- Communicating state change
- Making interaction feel responsive
- Supporting storytelling
Best mindset
Animation is not decoration first. It is communication first. 🎯
That one principle helps prevent a lot of amateur-looking decisions.
Misunderstanding 11: “If I copy a tutorial exactly, it should work exactly the same on my site”
This is extremely common and completely normal.
Beginners often follow a tutorial step by step and then feel confused when their result differs.
Why copied code behaves differently
Because your project may differ in:
- HTML structure
- CSS defaults
- Class names
- Container sizes
- Positioning context
- Font loading
- Responsive breakpoints
- Builder-generated wrappers
- Script load order
So even if the animation logic is valid, the environment is different.
What beginners often overlook
Tutorials are usually shown in controlled conditions:
- Clean markup
- Minimal conflicting CSS
- Predictable content
- Simple section structure
Real projects are messier.
How to avoid this trap
-
Study the principle, not just the syntax
Ask:
- What is being animated?
- Why these properties?
- What layout assumptions does this require?
- What must be true for this to work?
-
Rebuild in a simplified test section first
Before dropping code into a complex production layout, test it in isolation.
-
Adapt selectors and structure deliberately
Do not assume your markup matches the tutorial.
Important growth milestone
A beginner starts by copying.
A more capable implementer starts asking:
“What conditions made this tutorial work, and do those conditions exist in my project?”
That is a major step forward 📈
Misunderstanding 12: “Performance only matters later”
Many beginners think performance is an advanced topic that can wait.
But performance affects beginner animation work immediately.
Early signs of performance problems
- Stuttering during scroll
- Janky hover effects
- Delayed page response
- Animations that feel heavy on mobile
- Too many simultaneous effects
- Large images combined with motion
Why beginners miss it
On a powerful desktop, things may appear acceptable.
But real users may be on:
- Slower devices
- Smaller screens
- weaker CPUs
- less stable network conditions
How to avoid it
-
Favor transform and opacity when possible
These are often more animation-friendly than layout-heavy properties.
-
Avoid animating too many elements at once
-
Be careful with large-scale scroll effects
-
Test on mobile
-
Use restraint
-
Build with user experience in mind, not demo excitement
Core lesson
A smooth simple animation often feels more professional than an ambitious but stuttering one.
Misunderstanding 13: “Debugging means changing random values until something works”
This is one of the biggest beginner habits to outgrow.
When something fails, beginners often start guessing:
- Change the duration
- Change the delay
- Add another wrapper
- Rename the class
- Add more code
- Reload repeatedly
- Try a different tutorial
Sometimes this accidentally works—but it does not build understanding.
Why this is harmful
Random tweaking creates:
- Fragile solutions
- Confusion about cause and effect
- Difficulty repeating success
- Fear of touching the code later
How to debug better
Use a structured sequence:
- Verify the element exists
- Verify the selector matches
- Verify the property can visibly change
- Verify the element is visible and not clipped
- Verify the code runs at the expected time
- Verify no conflicting CSS or JS exists
- Simplify the animation
- Add complexity back gradually
Example debugging mindset
Instead of:
“Let me try random settings.”
Use:
- Is the element selected?
- Is the animation running?
- Is the property change visible?
- Is layout preventing me from seeing it?
- Is timing wrong?
This is slower emotionally, but faster practically 🛠️
Misunderstanding 14: “Learning animation means learning lots of tricks”
Beginners often think animation mastery is about collecting impressive effects.
In reality, strong animation implementation usually comes from mastering a few fundamentals very well.
The real core concepts
- Position
- Scale
- Rotation
- Opacity
- Timing
- Delay
- Sequencing
If you deeply understand those seven ideas, you can build a surprising amount.
Why beginners get distracted
The internet rewards novelty:
- Complex text effects
- Fancy scroll scenes
- Layered reveals
- Parallax stacks
- Morphing transitions
But these all still depend on fundamentals.
How to avoid this misunderstanding
Before chasing advanced effects, become comfortable with:
- Fading something in cleanly
- Moving something in one axis clearly
- Sequencing two or three related elements
- Applying delay with intention
- Making motion feel smooth rather than flashy
A useful reminder
Advanced-looking animation is often just simple properties combined thoughtfully.
That should be encouraging, not disappointing.
Misunderstanding 15: “I need to understand everything before I can build anything”
This misunderstanding stops many learners before they gain momentum.
Because animation touches CSS, JavaScript, layout, and timing, beginners may feel they must fully master all of web development first.
That is not necessary.
What you actually need
You need enough understanding to avoid being lost in these areas:
- Basic CSS structure
- Basic layout concepts
- Basic JavaScript ideas
- Element selection
- When code runs
- How transforms and opacity behave
Why this matters
If you wait for total confidence, you may never start.
But if you start without any foundation, every problem feels mysterious.
The practical middle path is:
- Learn enough fundamentals
- Build small examples
- Debug real issues
- Expand gradually
Better expectation
You do not need to know everything.
You do need to know enough to reason about what the browser is doing.
That is a much more achievable goal 👍
How to build beginner instincts that actually help
If you want to avoid most early misunderstandings, these habits matter more than memorizing syntax.
-
Inspect the DOM
- See what is really rendered.
- Verify class names and nesting.
-
Think in properties
- What exactly is changing?
- Position?
- Opacity?
- Scale?
-
Think in states
- What is the starting state?
- What is the ending state?
- When does the change happen?
-
Think in context
- Is layout affecting the result?
- Is overflow clipping it?
- Is another style interfering?
-
Think in timing
- Did the script run too early?
- Did the scroll trigger initialize before layout stabilized?
-
Simplify aggressively when debugging
- Fewer wrappers
- fewer properties
- clearer values
- isolated test cases
-
Use animation intentionally
- Guide attention
- clarify interaction
- support content
- avoid excess
These habits lead to faster improvement than chasing “magic settings.”
A simple mental framework for diagnosing animation issues
When something goes wrong, check these five layers in order:
-
Selection
- Am I targeting the correct element?
-
Visibility
- Can I actually see the change?
-
Layout
- Is CSS structure hiding, clipping, or distorting the motion?
-
Timing
- Is the animation running at the correct moment?
-
Intent
- Am I asking the animation to solve the right problem?
This is almost like a practical debugging formula:
$$
\text{Visible result} = \text{correct element} + \text{correct timing} + \text{correct layout context} + \text{meaningful property change}
$$
If any one term is missing, the result can appear “broken.”
Final perspective
Most beginner misunderstandings do not come from lack of intelligence or lack of effort.
They come from a perfectly normal early assumption:
“Animation is just about animation.”
But in real implementation, animation is really a coordination problem between:
- Structure
- Style
- Timing
- Motion
- User experience
Once you understand that, a lot of confusion starts to disappear 🌱
So if you are early in your learning journey, try to remember:
- Not every broken animation is an animation problem.
- Layout and selectors matter as much as syntax.
- Simpler effects done well are more professional than complex effects done poorly.
- Debugging methodically is a superpower.
- Restraint is part of good animation design.
3. Setting Up GSAP in WordPress and BricksBuilder
This module moves from theory into implementation. Its role is to show you how GSAP fits into a real WordPress and BricksBuilder environment, how to load it correctly, and how to avoid common setup mistakes that often confuse beginners. Instead of treating installation as a minor technical step, the course presents it as the foundation for everything that follows. If your environment is not clean and predictable, animation work becomes frustrating very quickly. 🛠️
You will learn the practical options for adding GSAP to a WordPress site, including script loading strategies, where custom code can live, and how BricksBuilder’s structure influences your workflow. The module also introduces the relationship between HTML structure, CSS classes, selectors, and JavaScript targeting—an essential bridge for learners who are not yet fully comfortable with front-end development. This helps you understand not just how to make GSAP available, but also how to connect it meaningfully to the elements you want to animate.
In addition, this section establishes good habits early: organizing code clearly, testing animations safely, checking whether scripts fire at the right time, and keeping your setup maintainable as projects grow. It also prepares the ground for later Glaze usage by making sure you first understand the underlying GSAP environment. By the end of the module, you should have a working animation-ready setup in WordPress and BricksBuilder and feel confident enough to begin writing your first real GSAP animations. ✅
3.1 What GSAP is and why developers love it
When talking about animation on the modern web, GSAP is one of the first tools that experienced front-end developers mention—and for good reason. In the context of WordPress and BricksBuilder, GSAP can be the difference between a site that merely looks assembled and one that feels intentional, polished, and alive ✨
At its core, GSAP gives developers precise control over how elements move, fade, scale, rotate, stagger, respond to scrolling, and transition between states. But that simple description still undersells it. To understand why developers love GSAP so much, it helps to look at both what it is technically and what problems it solves in real-world site building.
what GSAP is
GSAP stands for GreenSock Animation Platform. It is a high-performance JavaScript animation library used to animate:
- HTML elements
- CSS properties
- SVGs
- Canvas elements
- JavaScript object values
- Scroll-driven interactions
- Complex animation sequences and timelines
In practical terms, GSAP lets you tell the browser things like:
- move this element from left to right,
- fade this heading in,
- animate cards one after another with a stagger,
- pin a section during scroll,
- synchronize multiple animations in a timeline,
- or trigger effects only when an element enters the viewport 👀
Unlike many simpler animation solutions, GSAP is not just a collection of predefined effects. It is a robust animation engine. That distinction matters.
A typical “lightweight animation library” might offer a few built-in entrance effects such as fade-up, fade-left, zoom-in, and so on. GSAP, by contrast, gives you a system for building animation logic. You are not limited to presets—you can design motion exactly as needed.
the basic idea behind GSAP
GSAP works by animating values over time.
If an element starts with:
opacity: 0y: 50
and ends with:
opacity: 1y: 0
GSAP calculates the intermediate values smoothly over a specified duration. That may sound simple, but the power comes from how much control you get over:
- Timing
- Easing
- Sequencing
- Trigger conditions
- Responsiveness
- Performance optimization
For example, a developer can define:
- a start state,
- an end state,
- a duration,
- an easing curve,
- and whether the animation should run immediately, on click, or during scroll.
That means GSAP is equally useful for:
- subtle UI polish,
- dramatic hero-section entrances,
- storytelling sections,
- product reveals,
- interactive landing pages,
- and highly choreographed scroll experiences.
why GSAP matters more than “just animation”
On the surface, animation may seem decorative. But in professional web design and development, motion often serves important functional roles 🎯
motion can improve communication
Animation can help users understand:
-
Hierarchy
Important content can enter first or more prominently. -
Relationship
Elements moving together suggest that they belong together. -
State changes
A menu opening, a filter updating, or a modal appearing becomes easier to interpret. -
Direction and flow
Motion can guide attention down a page or toward a call to action. -
Feedback
Hover animations, loading indicators, and transition states reassure users that the interface is responding.
GSAP is especially valued because it allows these effects to be implemented with precision rather than randomness. Developers can craft motion that feels smooth, deliberate, and aligned with the brand.
why developers love GSAP
There are many animation tools available, including CSS transitions, CSS keyframes, the Web Animations API, and smaller JavaScript libraries. So why does GSAP have such a strong reputation among professionals? The answer is that it solves a number of problems exceptionally well.
1. it is extremely powerful
GSAP can handle animations ranging from very simple to highly complex.
A beginner might use it to animate a button fade-in. An advanced developer might use it to create:
- a timeline with overlapping sequences,
- scroll-synced panel transitions,
- text reveal effects,
- SVG morphing,
- pinned storytelling sections,
- or interactive page choreography.
The same library scales from small enhancements to large production builds. That flexibility is a huge reason developers adopt it early and keep using it.
2. it performs very well
Performance is one of GSAP’s biggest strengths ⚡
Animations can easily become janky if they are not handled carefully. Poor animation harms user experience more than no animation at all. GSAP is built with performance in mind and is known for:
- Efficient rendering
- Smooth frame updates
- Cross-browser consistency
- Optimization around animated values
- Reliable handling of transforms and opacity
In web animation, performance is often tied to animating properties the browser can render efficiently, especially transforms like:
xyscalerotationopacity
GSAP makes this kind of animation straightforward and ergonomic. Developers appreciate that they can achieve polished results without constantly fighting the browser.
3. it has a great API
One reason GSAP feels so loved in the developer community is that its API is clear, expressive, and enjoyable to work with 😊
For example, the core methods are intuitive:
gsap.to()gsap.from()gsap.fromTo()gsap.timeline()
Even without seeing much code, many developers immediately understand the intent:
to()animates to a target statefrom()animates from a starting statefromTo()explicitly defines both start and end statestimeline()sequences multiple animations together
That readability matters a lot in real projects. Code is not only written—it is maintained, reviewed, and revisited months later. GSAP tends to produce animation code that is relatively easy to reason about.
4. timelines are a major advantage
One of GSAP’s most beloved features is the timeline system.
Without a timeline, complex animations often become messy. Developers end up chaining delays manually, coordinating independent animations awkwardly, and recalculating timing if anything changes.
A GSAP timeline solves that elegantly.
With a timeline, a developer can:
- add animations in sequence,
- overlap them,
- control the whole animation as one unit,
- pause or reverse it,
- restart it,
- or synchronize it with user interaction.
This is especially useful in page-builder workflows like BricksBuilder, where sections often contain multiple elements:
- heading,
- subheading,
- buttons,
- image,
- decorative background elements.
Instead of animating each item with disconnected logic, GSAP allows all of them to be orchestrated in a coherent sequence. That creates a much more professional result.
5. easing control is excellent
Animation quality is not just about what moves, but how it moves.
The term easing describes the rate of change over time—whether an animation starts slowly, accelerates, decelerates, overshoots, or bounces. In conceptual terms, if progress is represented by a value $p$ over time $t$, easing changes the relationship so that motion does not feel linear or robotic.
Instead of a simplistic linear relationship like $p = t$, easing functions shape the curve so movement feels more natural.
Developers love GSAP because its easing options are:
- easy to apply,
- expressive,
- professional-looking,
- and suitable for both subtle and dramatic motion.
Good easing is one of those details users may not consciously notice, but they absolutely feel it. A site with well-tuned easing often feels more premium.
6. scroll-based animation is exceptionally strong
For WordPress and BricksBuilder users, this point is especially important 📌
Modern websites often rely on scroll interactions such as:
- reveal-on-scroll,
- parallax effects,
- pinned sections,
- progress-based animations,
- section transitions,
- and storytelling sequences tied to page movement.
GSAP’s ecosystem—especially with ScrollTrigger—is one of the most respected solutions for this kind of work.
Developers love it because scroll animation is notoriously tricky. Challenges include:
- viewport calculations,
- trigger timing,
- responsiveness,
- refresh behavior on resize,
- smooth synchronization,
- and avoiding layout glitches.
GSAP handles these challenges with a level of maturity that saves developers a great deal of time and frustration.
7. it works well with real layouts
This is one of the biggest practical reasons GSAP is so useful in WordPress environments.
Real websites are not clean demo files. They contain:
- nested containers,
- responsive breakpoints,
- dynamically generated content,
- theme styles,
- builder-generated markup,
- sticky headers,
- lazy-loaded media,
- and sometimes plugin conflicts.
Developers love GSAP because it is flexible enough to work inside these realities rather than only in idealized examples.
With BricksBuilder specifically, GSAP can be applied to:
- elements with custom classes,
- builder-generated sections and containers,
- reusable components,
- dynamic content loops,
- popups and off-canvas panels,
- and custom code areas.
That makes it a strong fit for production WordPress sites, not just experimental microsites.
8. it reduces the pain of cross-browser inconsistencies
Historically, browser differences have made animation frustrating. Even when standards improve, there are still implementation details, rendering quirks, and timing inconsistencies that developers need to account for.
GSAP has long been respected for smoothing over many of those rough edges. That does not mean it magically removes every browser issue, but it does mean developers spend less time debugging strange animation behavior.
That reliability builds trust. And developers tend to love tools they can trust.
9. it is suitable for both micro-interactions and large experiences
A great animation library should not force a project into one style of motion.
GSAP can be used for tiny enhancements such as:
It can also drive full-scale experiences such as:
- immersive landing pages,
- multi-step scroll narratives,
- animated product showcases,
- complex homepage hero sections,
- interactive brand storytelling.
That range is important. Developers do not want one tool for “small motion” and another for “serious animation” if they can avoid it. GSAP often becomes the single trusted animation layer across a project.
10. it is highly controllable
GSAP is not only about starting animations—it is about controlling them.
Developers can often:
- pause animations,
- resume them,
- reverse them,
- restart them,
- scrub them with scroll,
- kill them when no longer needed,
- or trigger them based on custom logic.
This level of control is very valuable in advanced interfaces. For instance, if a menu opens and closes repeatedly, or a modal needs entrance and exit transitions, or a scroll section must update based on viewport changes, control becomes essential.
GSAP gives developers that control without requiring them to reinvent animation state management from scratch.
11. it is well documented and widely respected
Another reason developers love GSAP is the surrounding ecosystem 📚
A tool becomes far more useful when it has:
- solid documentation,
- real-world examples,
- an active community,
- tutorials,
- and long-term industry credibility.
GSAP has all of these. That matters especially in WordPress development, where teams often need solutions that are maintainable and understandable by others. A library that only one niche expert understands is risky. GSAP is much easier to justify in professional workflows because it is so well established.
how GSAP compares to CSS animation alone
It is important to say clearly: CSS animations and transitions are not bad. In fact, they are often the right choice for simple hover effects or lightweight UI transitions.
However, developers often switch to GSAP when they need more than CSS can comfortably provide.
CSS is often enough for
- simple hover transitions,
- straightforward opacity or transform changes,
- basic keyframe loops,
- small decorative effects.
GSAP becomes preferable when you need
- precise sequencing
- complex timelines
- runtime control
- scroll synchronization
- advanced stagger logic
- conditional triggering
- better orchestration across multiple elements
- more maintainable animation code for large interfaces
In other words:
- CSS is excellent for simple, isolated motion.
- GSAP shines when animation becomes part of the application logic or page experience.
That is one of the biggest reasons developers love it: it gives them a toolset that matches the complexity of modern websites.
why GSAP is especially relevant in WordPress and BricksBuilder
In WordPress, many users start with page-builder animations because they are easy to apply visually. That convenience is useful, but built-in animations can become limiting when a project needs more polish or custom behavior.
GSAP becomes attractive because it adds a developer-grade animation layer on top of a builder workflow.
For a BricksBuilder project, that means you can move beyond default effects and create:
- entrance animations tailored to the layout,
- staggered card reveals,
- hero animations tied to load or scroll,
- pinned sections for storytelling,
- synchronized motion between text and imagery,
- custom interactions for menus, popups, and components.
Developers love this because it preserves the speed of a visual builder while restoring the fine-grained control of custom front-end development.
In other words, GSAP helps bridge two worlds:
- the efficiency of WordPress and BricksBuilder
- the precision of handcrafted interactive development
That combination is powerful 💡
a deeper reason developers love GSAP: it makes motion feel intentional
There is also a less technical reason behind GSAP’s popularity.
Developers and designers often care deeply about the feel of an interface. They do not just want elements to move—they want them to move in a way that matches:
- the brand,
- the content,
- the pacing,
- the emotional tone,
- and the user journey.
GSAP supports that kind of intentionality.
A luxury brand site might need slow, elegant, restrained transitions.
A startup landing page might need energetic, crisp motion.
A portfolio site might need cinematic scroll choreography.
A SaaS dashboard might need subtle, efficient micro-interactions.
GSAP is loved because it can support all of these styles without boxing developers into generic presets.
common developer sentiments about GSAP
If you spend time in front-end communities, the praise for GSAP tends to cluster around a few recurring themes:
-
“It just works.”
Developers value reliability enormously. -
“It makes hard things easier.”
Especially timelines and scroll interactions. -
“The API feels good.”
Good developer experience matters more than people sometimes admit. -
“It is production-ready.”
Not just fun for demos, but dependable for real client work. -
“It gives me control.”
This may be the single most important point.
That last point is worth emphasizing: GSAP gives control without excessive pain. That is a rare combination.
what this means for your WordPress/BricksBuilder workflow
When introducing GSAP into a WordPress and BricksBuilder project, you are not merely adding “fancier animation.” You are adding a system that can improve how you build and structure motion across the site.
That means:
-
More consistency
Animations can follow shared timing and easing rules. -
More scalability
You can build small effects now and more advanced interactions later. -
More maintainability
Instead of scattered ad hoc animation settings, you can centralize logic. -
More polish
Motion can be tuned to feel smoother and more intentional. -
More creative freedom
You are no longer restricted to whatever default animation controls the builder exposes.
For developers, this is exciting because it expands what WordPress can do without abandoning the WordPress ecosystem.
in summary
GSAP is a professional-grade JavaScript animation platform that allows developers to create smooth, high-performance, highly controllable animations for the web.
Developers love it because it offers:
- power
- performance
- precise control
- excellent timelines
- strong easing options
- industry-leading scroll animation capabilities
- good maintainability
- reliability in real-world builds
- flexibility across simple and advanced use cases
In the specific context of WordPress and BricksBuilder, GSAP is especially valuable because it adds custom animation capability on top of visual site-building workflows. It enables developers to create experiences that feel more refined, more branded, and more interactive—without being boxed in by default builder animations.
So if you are setting up GSAP in a BricksBuilder-based WordPress site, the key idea is this:
GSAP is not just an animation library. It is a motion framework for front-end craftsmanship 🛠️
And that is exactly why so many developers genuinely love working with it.
suggested transition to the next subsection
A natural next step after this explanation would be:
- how GSAP fits into a WordPress architecture
- where to enqueue or load GSAP
- how to target BricksBuilder elements safely
- and how to structure animations so they remain maintainable
If you want, I can also expand the next part in the same style—such as “3.2 How GSAP integrates into WordPress and BricksBuilder technically”.
3.3 Different ways to add GSAP to a WordPress site
If you want to use GSAP in WordPress—especially together with BricksBuilder—there are several valid ways to include it. Which one is “best” depends on how comfortable you are with code, how reusable your setup should be, and how much control you want. 🎯
This topic is important because many animation problems are not caused by GSAP itself, but by how it was loaded, when it becomes available, or where your custom code runs.
In practice, there are four main approaches you should know:
- adding GSAP via a CDN directly in the page or template
- adding GSAP globally via WordPress enqueueing
- adding GSAP through a code snippets/plugin-based workflow
- bundling GSAP in a custom theme or child theme workflow
For a WordPress + BricksBuilder user, you do not need to master all of them immediately. But you should understand the pros and cons of each, because later—when your projects grow—you may want to switch from a quick setup to a cleaner, more scalable one.
before we compare the methods: what does “adding GSAP” actually mean?
When you “add GSAP” to a website, you usually need to load:
- the core GSAP library
- optionally one or more plugins, such as:
ScrollTriggerScrollToPluginTextPlugin- others depending on your needs
- your own custom animation code, which uses GSAP
A simple mental model is:
- first the browser loads GSAP
- then it loads any GSAP plugins
- then it loads your own script that says what should animate
If this order is wrong, your code may fail.
For example, this will only work if GSAP has already been loaded:
gsap.to(".box", {
x: 200,
duration: 1
});
And this will only work if both GSAP and ScrollTrigger are already loaded and registered:
gsap.registerPlugin(ScrollTrigger);
gsap.to(".box", {
scrollTrigger: ".box",
y: 100,
duration: 1
});
So whenever we discuss “ways to add GSAP,” we are really discussing:
- where the files come from
- where they are inserted into WordPress
- in what order they are loaded
- whether they are loaded on one page or the whole site
- how easy it is to maintain later
method 1: adding GSAP via CDN directly in a page, template, or code block
This is usually the fastest way to get started. 🚀
A CDN is a hosted URL from which the browser loads a JavaScript file. Instead of storing GSAP inside your theme, you link to it from an external source.
how this works
You place a <script> tag somewhere in your site output, for example:
- in a custom code area in Bricks
- in the page/template footer
- in a header/footer injection plugin
- in a custom HTML/code element
Example:
<script src="https://cdn.jsdelivr.net/npm/gsap@3/dist/gsap.min.js"></script>
<script>
gsap.to(".box", {
x: 200,
duration: 1
});
</script>
If you need ScrollTrigger, you also load that:
<script src="https://cdn.jsdelivr.net/npm/gsap@3/dist/gsap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gsap@3/dist/ScrollTrigger.min.js"></script>
<script>
gsap.registerPlugin(ScrollTrigger);
gsap.to(".box", {
scrollTrigger: ".box",
y: 100,
duration: 1
});
</script>
where you might do this in WordPress / Bricks
Possible places include:
- Bricks page settings or template-level custom code
- a Code element in Bricks
- a plugin that allows header/footer scripts
- theme options or site settings that allow custom scripts
why beginners often like this method
Because it is:
- quick
- visual
- easy to test
- ideal for learning
You can create a section in Bricks, give it a class like .box, paste in a script, and immediately see something move.
advantages
-
very easy to start
- no theme file editing required
- no enqueue function needed
- minimal WordPress knowledge needed
-
good for experiments
- useful when learning GSAP basics
- useful when building a one-off prototype
- useful when testing a small effect on a single page
-
page-specific loading
- you can load GSAP only where needed
- this can be helpful if only one landing page uses animation
disadvantages
-
harder to maintain
- scripts may end up scattered across pages, templates, and code blocks
- later you may forget where a certain animation was added
-
dependency/order issues
- if your custom script runs before GSAP is loaded, it breaks
- if
ScrollTriggeris loaded after your code, it breaks
-
not ideal for larger projects
- many pages with animation become messy
- updating versions across many pages becomes annoying
-
possible duplication
- you might accidentally load GSAP multiple times
- that can lead to confusion or performance issues
when to use it
Use this method if:
- you are just learning
- you want to test a small animation quickly
- you are building a simple one-page effect
- you are not yet ready to work with theme files or enqueue functions
when not to use it
Avoid relying on this as your long-term default if:
- your site has many animated pages
- you want a clean, scalable setup
- you work on client projects that need easier maintenance
- you want centralized control over scripts
practical recommendation
For a beginner in BricksBuilder, this is an excellent sandbox method. Learn here first. But do not assume it is always the best production architecture.
method 2: adding GSAP properly via WordPress enqueueing
This is the WordPress-native way, and in many cases the best long-term solution ✅
WordPress has a built-in system for loading CSS and JavaScript files called enqueueing. Instead of manually printing <script> tags wherever you want, you tell WordPress which scripts to load, and WordPress handles output and ordering more cleanly.
why enqueueing matters
When scripts are enqueued properly, WordPress can better manage:
- dependencies
- load order
- footer vs header loading
- conditional loading
- conflicts with themes/plugins
This makes your setup more robust.
a basic example
You would typically add this to your theme’s functions.php file, or better, to a child theme:
function mytheme_enqueue_gsap() {
wp_enqueue_script(
'gsap',
'https://cdn.jsdelivr.net/npm/gsap@3/dist/gsap.min.js',
array(),
'3.12.5',
true
);
wp_enqueue_script(
'gsap-scrolltrigger',
'https://cdn.jsdelivr.net/npm/gsap@3/dist/ScrollTrigger.min.js',
array('gsap'),
'3.12.5',
true
);
wp_enqueue_script(
'my-gsap-animations',
get_stylesheet_directory_uri() . '/js/animations.js',
array('gsap', 'gsap-scrolltrigger'),
'1.0',
true
);
}
add_action('wp_enqueue_scripts', 'mytheme_enqueue_gsap');
Your custom animation code would then live in a separate file, for example /js/animations.js:
gsap.registerPlugin(ScrollTrigger);
gsap.to(".box", {
scrollTrigger: ".box",
y: 100,
duration: 1
});
what this code means
Let’s unpack it carefully:
-
wp_enqueue_script(...)- tells WordPress to load a JavaScript file
-
'gsap'- this is the script handle
- WordPress uses it as an internal name
-
'https://cdn.jsdelivr.net/npm/gsap@3/dist/gsap.min.js'- this is the file URL
-
array()- this means GSAP core has no dependency in this setup
-
'3.12.5'- this is the version string
- useful for cache-busting and clarity
-
true- load in the footer
- generally good for performance and safer for DOM-related code
For ScrollTrigger, this line matters a lot:
array('gsap')
That tells WordPress:
“Load
ScrollTriggeronly aftergsaphas loaded.”
And here:
array('gsap', 'gsap-scrolltrigger')
you tell WordPress:
“Load my animation file only after both GSAP core and ScrollTrigger are available.”
That is one of the biggest advantages of enqueueing.
advantages
-
cleaner structure
- GSAP loading is centralized
- your animation logic lives in its own file
-
better dependency management
- WordPress handles load order
- fewer “gsap is not defined” errors
-
more scalable
- better for larger sites
- better for reusable workflows
- better for client projects
-
easier maintenance
- update a version in one place
- update one JS file instead of many inline snippets
-
closer to professional practice
- this is the way many developers structure scripts in WordPress
disadvantages
-
requires some PHP
- even if only a little
- this may feel intimidating at first
-
slower to set up initially
- compared to just pasting script tags into a page
-
you need file access
- child theme
- theme editor
- SFTP or hosting file manager
- a code snippets workflow that supports this logic
when to use it
This is ideal if:
- you want a solid long-term setup
- you animate across multiple pages
- you want your code to stay organized
- you are ready to learn a little WordPress development structure
important best practice: use a child theme
If you place code directly in a parent theme and later update the theme, your changes may be overwritten. 😬
So if you are editing functions.php, it is usually safer to do so in a child theme.
conditional loading
A very useful improvement is to load GSAP only on pages that actually need it.
Example:
function mytheme_enqueue_gsap() {
if (!is_page('landing-page')) {
return;
}
wp_enqueue_script(
'gsap',
'https://cdn.jsdelivr.net/npm/gsap@3/dist/gsap.min.js',
array(),
'3.12.5',
true
);
wp_enqueue_script(
'my-gsap-animations',
get_stylesheet_directory_uri() . '/js/landing-page-animations.js',
array('gsap'),
'1.0',
true
);
}
add_action('wp_enqueue_scripts', 'mytheme_enqueue_gsap');
This means:
- if the current page is not
landing-page, stop immediately - otherwise, load GSAP and your animation file
This is cleaner than loading everything site-wide when only one page needs it.
method 3: adding GSAP through a code snippets plugin or script management plugin
This is a kind of middle ground between “quick and easy” and “properly structured.” ⚖️
Instead of editing theme files manually, you use a plugin that lets you insert PHP, JavaScript, or site-wide scripts in a managed interface.
Examples of plugin categories:
- Code Snippets plugins
- Header/Footer script plugins
- asset/script manager plugins
- some advanced custom code manager plugins
how this works
There are two main variations:
- you insert raw
<script>tags globally - you add PHP that uses
wp_enqueue_script()
The second is generally better if the plugin supports PHP snippets safely.
example: enqueueing GSAP through a snippets plugin
function mysite_enqueue_gsap() {
wp_enqueue_script(
'gsap',
'https://cdn.jsdelivr.net/npm/gsap@3/dist/gsap.min.js',
array(),
'3.12.5',
true
);
wp_enqueue_script(
'gsap-scrolltrigger',
'https://cdn.jsdelivr.net/npm/gsap@3/dist/ScrollTrigger.min.js',
array('gsap'),
'3.12.5',
true
);
}
add_action('wp_enqueue_scripts', 'mysite_enqueue_gsap');
Then you might place your custom JS:
- in a separate JS file
- in a page-level code area
- in another snippet/plugin field depending on the plugin
why this is attractive
For many WordPress users, especially non-developers, this is easier because:
- no theme file editing is required
- your custom code survives theme updates
- plugin interfaces can be less intimidating than file editing
advantages
-
safer than editing parent theme files
- theme updates are less risky
-
often easier for non-developers
- no SFTP required
- no direct file management required
-
can still be fairly organized
- especially if the plugin supports named snippets
- you can label snippets clearly
-
good transition step
- excellent if you are learning WordPress development concepts gradually
disadvantages
-
depends on another plugin
- more plugin dependency
- plugin settings differ from tool to tool
-
can still become messy
- if you store too many unrelated scripts in too many snippets
-
sometimes less transparent
- another developer may need to search plugins to find your script setup
-
not always ideal for larger development workflows
- especially if you later move toward version-controlled theme/project files
when to use it
This is a strong option if:
- you don’t want to edit theme files yet
- you want something more maintainable than random page-level script tags
- you are comfortable managing code in a plugin interface
- you want a relatively safe setup on client sites
a very practical beginner-friendly approach
A nice compromise can be:
- enqueue GSAP and plugins globally or conditionally via a snippets plugin
- keep small page-specific animation code inside Bricks where it is used
- move larger animation code into separate JS files later
That way, your library loading is centralized, but your small experiments remain easy to work with.
method 4: bundling GSAP in a custom theme or child theme workflow
This is the most “developer-style” approach and often the cleanest for serious projects 🛠️
Instead of relying on CDN links everywhere, you may keep your scripts in your project structure and load them through your theme or build process.
what this can mean
This can range from relatively simple to quite advanced:
- storing your own custom JS files inside the theme
- enqueueing local copies of GSAP files
- using a build tool or bundler
- organizing animations into modules/files
For your current level, you probably do not need the advanced version yet. But it is good to understand the direction.
local file example
Suppose you store GSAP files inside your child theme:
/js/vendor/gsap.min.js/js/vendor/ScrollTrigger.min.js/js/animations.js
Then enqueue them:
function mytheme_enqueue_local_gsap() {
wp_enqueue_script(
'gsap',
get_stylesheet_directory_uri() . '/js/vendor/gsap.min.js',
array(),
'3.12.5',
true
);
wp_enqueue_script(
'gsap-scrolltrigger',
get_stylesheet_directory_uri() . '/js/vendor/ScrollTrigger.min.js',
array('gsap'),
'3.12.5',
true
);
wp_enqueue_script(
'my-animations',
get_stylesheet_directory_uri() . '/js/animations.js',
array('gsap', 'gsap-scrolltrigger'),
'1.0',
true
);
}
add_action('wp_enqueue_scripts', 'mytheme_enqueue_local_gsap');
CDN vs local file: what is the difference?
With a CDN:
- files are loaded from an external server
With local files:
- files are served from your own site/theme
Neither is automatically “always better.” It depends on priorities.
CDN advantages
- quick to set up
- easy to update URL versions
- no need to manage local vendor files manually
local file advantages
- more project control
- less dependence on third-party external URLs
- easier to version together with the project files
- often preferable in structured development workflows
disadvantages of a custom theme workflow
- more setup complexity
- requires more confidence with file structure
- may involve build tooling later
- can feel like overkill for small sites
when to use it
Use this if:
- you build custom WordPress sites regularly
- you want a reusable professional workflow
- you manage code in a structured way
- you may later adopt Git/version control and more advanced JS organization
method 5: loading GSAP only where Bricks needs it
This is not a totally separate technical method, but rather an important strategy for WordPress + BricksBuilder projects.
A common beginner mistake is:
- load GSAP everywhere
- put all animation logic in one giant script
- target many classes globally
- lose track of what affects what
A better approach is often:
- load the library globally or conditionally
- keep animation code grouped by template/page/component
- use consistent classes and naming
For example:
- one JS file for hero animations
- one JS file for scroll sections
- one JS file for reusable components like sliders/cards
- or one main file with clearly separated sections
This becomes especially useful in Bricks because Bricks encourages visual building, and without structure your JS can become hard to map back to the layout.
a realistic comparison of the methods
Here is the practical comparison in plain language:
-
CDN directly in page/template
- best for: learning, testing, small one-off effects
- weakest point: maintenance becomes messy
-
WordPress enqueueing in theme/child theme
- best for: long-term clean setup
- weakest point: requires some PHP confidence
-
code snippets/plugin-based loading
- best for: users who want structure without editing theme files
- weakest point: still plugin-dependent and can become messy if overused
-
custom theme/local asset workflow
- best for: advanced or growing professional projects
- weakest point: more setup complexity
If I were advising someone with limited JS/CSS skills but who wants to learn properly, I would suggest this progression:
- start with page-level CDN loading to understand GSAP basics
- then move to snippet/plugin-based enqueueing
- then learn child theme enqueueing
- later, if needed, adopt a more structured local/bundled workflow
That learning path keeps your cognitive load manageable. 🧠
important technical details you should understand regardless of method
No matter which loading method you choose, a few concepts always matter.
1. load order
Your custom GSAP code must run after GSAP is available.
Bad order:
- your animation code runs
- GSAP loads afterward
Result: error such as gsap is not defined
Good order:
- GSAP core loads
- GSAP plugin loads
- your custom animation code runs
2. plugin registration
Some GSAP plugins should be registered before use:
gsap.registerPlugin(ScrollTrigger);
If you forget this, your scroll-based animations may not work correctly.
3. DOM readiness
Even if GSAP is loaded correctly, the elements you want to animate must also exist when your code runs.
For example, this may fail if .box is not yet in the DOM at execution time:
gsap.to(".box", {
x: 200
});
A safer beginner pattern is:
document.addEventListener("DOMContentLoaded", function () {
gsap.to(".box", {
x: 200,
duration: 1
});
});
This says:
- wait until the HTML document has loaded
- then run the animation code
This is especially useful in WordPress because page builders, templates, and dynamic content can make script timing less obvious.
4. page builders can change markup
With BricksBuilder, what you see visually is tied to generated HTML. If you later change:
- a class name
- a nested structure
- a template assignment
your GSAP selector may stop matching.
So this selector:
gsap.to(".hero-title", {
y: 50
});
only works if an element with class .hero-title still exists on the front end.
That is why consistent class naming is very important.
5. avoid loading the same library multiple times
This is a surprisingly common issue.
For example:
- GSAP loaded in a header/footer plugin
- GSAP loaded again in Bricks custom code
- GSAP loaded a third time in
functions.php
This can create debugging confusion. Even if it does not always break visibly, it is bad practice.
Try to keep a clear answer to the question:
“Where exactly is GSAP being loaded on this site?”
If you cannot answer that in one sentence, your setup may already be getting messy.
recommended setups for different skill levels
if you are an absolute beginner
Use:
- CDN + page-level script
- maybe inside a Bricks code block or page custom code area
Why:
- fastest feedback loop
- easiest for learning syntax
- minimal setup complexity
But keep it limited to experiments.
if you are a beginner who wants a cleaner real-site setup
Use:
- a Code Snippets-style plugin to enqueue GSAP
- a separate custom JS file if possible
- small page-specific code only where needed
Why:
- safer than editing theme files too early
- more maintainable than scattered inline scripts
- good stepping stone toward proper development practice
if you are building more serious projects
Use:
- child theme enqueueing
- separate JS files
- conditional loading where sensible
- clear naming conventions for Bricks elements
Why:
- cleaner architecture
- easier maintenance
- better scalability
recommended setup specifically for WordPress + BricksBuilder learners
For your situation, I would recommend the following staged approach:
-
phase 1: learn GSAP with the simplest possible setup
- load GSAP via CDN
- paste small scripts into a controlled test page in Bricks
- animate simple classes like
.box,.title,.button
-
phase 2: centralize library loading
- move GSAP loading into a snippet/plugin-based global setup
- stop loading the library individually on every test page
-
phase 3: separate your animation logic
- move your custom animations into a JS file
- keep the file organized by section or component
- use comments to mark each animation area
-
phase 4: move to child theme enqueueing when you feel ready
- this gives you a more professional workflow
- especially useful for client work or bigger sites
This sequence is effective because it respects the idea that learning has a kind of “cost function” 😊
If we think of setup difficulty as $D$ and learning benefit as $B$, then for beginners you want a method where the ratio $\frac{B}{D}$ is as high as possible. Early on, simple setups often give better returns; later, cleaner architecture becomes more valuable.
a simple decision guide
If you are unsure which method to choose, use this rule of thumb:
-
I just want to test GSAP today
- use CDN in the page/template
-
I want a safer no-theme-edit workflow
- use a snippets/plugin approach
-
I want a clean long-term WordPress setup
- use child theme enqueueing
-
I build structured custom projects
- use a custom theme/local asset workflow
common mistakes to avoid
- putting GSAP code before the library is loaded
- forgetting to load or register plugins like
ScrollTrigger - animating selectors that do not exist on the front end
- loading GSAP multiple times from different places
- storing too much important logic in scattered inline scripts
- editing a parent theme directly
- not checking whether scripts should load globally or only on specific pages
my practical recommendation in one sentence
For learning, start with CDN + simple page-level code; for real projects, move as soon as possible toward centralized loading via snippets or child-theme enqueueing. ✅