This example shows how to use a GSAP timeline to create a hover effect where two overlapping text layers animate in and out.
const tl = gsap.timeline({
paused: true,
defaults: { duration: 0.5, ease: "power2.out" }
})
paused: true: It waits until you manually call play()defaults: {...}: These values apply to all animations in the timeline.Using a timeline makes it easy to:
reverse()).