Timelines
Timelines are fully supported in Glaze.
Usage
Start with the tl
keyword inside the data attribute to establish a timeline.
Glaze then treats the following strings as configuration options for this
timeline.
This example initiates a timeline with specified default easing
, duration
,
and yoyo
properties.
Elements
By design, Glaze incorporates all child elements of a timeline-declared element into the timeline's scope, eliminating the need for explicit inclusion.
Adjust timing for individual elements using the tl:
prefix to delay or advance
their animation start times within the timeline.
Responsive timelines
Leverage media queries to control timeline execution. The example below
demonstrates a timeline that activates at the lg
breakpoint and adjusts
individual element animations responsively.
This approach ensures the timeline and its component animations adapt to varying screen sizes.
Hooking into a timeline
Assign a name to your timeline to link animations from external elements, thereby extending the timeline's scope beyond its original container.
In the example below, the named timeline (main
) allows for animations defined
on other elements to join the timeline using the tl:{name}
syntax.