Skip to content

fade

fade brings an element from invisible to visible. Add a direction suffix (fade-up, fade-down, fade-left, fade-right) to combine the opacity tween with a translate from that direction.

VariantWhat it does
fadeopacity 0 → 1, no transform
fade-upopacity + translateY from below (50px)
fade-downopacity + translateY from above
fade-leftopacity + translateX from the right
fade-rightopacity + translateX from the left
AttributeDefaultNotes
aa-animate(required)one of the variants above
aa-distance1multiplier on the 50px translate
aa-duration(init)seconds — falls back to init({ duration }) (default 0.6)
aa-delay0seconds
aa-ease(init)any GSAP ease — falls back to init({ ease }) (default power4.out)
aa-stagger(off)when set on a parent with children, staggers the children
aa-scrub(off)true or seconds — bind progress to scroll

gsap, ScrollTrigger.

fade-up
fade-down
fade-left
fade-right

aa-distance scales the 50px translate offset.

distance 1
distance 3
distance 6

Add aa-stagger to a wrapper to animate its direct children in sequence. Each child runs the same animation with the stagger value (in seconds) between starts.

child 1
child 2
child 3
child 4
child 5
child 6

Add aa-scrub to bind animation progress to scroll position. The element starts hidden and reveals progressively as you scroll. Pass true for an instant lock, or a number of seconds for smoothing lag.

1s smoothing