Capítulo 356 de 411

Chapter 356: ScrollTrigger.defaults

Core Idea

Allows you to set the default values that apply to every ScrollTrigger upon creation, like toggleActions, markers, etc.

Key Concepts

  • config: Object

Code Examples

ScrollTrigger.defaults({
  toggleActions: "restart pause resume none",
  markers: {
    startColor: "white",
    endColor: "white",
    fontSize: "18px",
    indent: 10,
  },
});
  • What it demonstrates: typical usage of ScrollTrigger.defaults in a GSAP animation.

Key Takeaways

  1. config: Object