Usage – Defaults

Last modified:

Setup

To use defaults, you need to define them inside the settings.

Usage

There is no usage! Once you define the defaults, they will be used automatically for either timelines or elements.

ScrollTrigger

Defaults are great for applying scroll triggers to all elements. For example, to make sure every animation will start when the user scrolls down to the element, simply add the following configuration to the timeline defaults.


                scrollTrigger:trigger-[&]|scrub-true

      
Copy

Note on timelines

Glaze creates a new timeline for each element by default, even if not marked with tl. This means that the tl defaults option is perfect for applying global defaults to all timelines and elements. (ScrollTrigger, ease etc.)