scroll |
Once, when 10% of the element is in the viewport (IntersectionObserver). |
Never. |
Same as intersect. Under reduced motion it activates immediately. |
intersect, intersect:once |
Once, on first viewport entry. |
Never. |
Under reduced motion it activates immediately. |
intersect:toggle |
Every time the element enters the viewport. |
Every time it leaves. |
For decoration that should only run while visible. |
hover |
When the pointer enters or the element (or anything inside it) receives focus. |
When it is neither hovered nor holds focus. |
Each new hover or focus replays the effect. Moving focus between children of the element does not. |
click |
On a click when inactive. |
On the next click. |
A toggle: first click on, second click off. |
click:replay |
On every click. |
Briefly, to restart the animation. |
For one-shot attention effects such as shake. |
time:delay |
Once, after delay. |
Never. |
delay is milliseconds (2000, 2000ms) or seconds (2s). |
media:(query) |
While the media query matches (checked at load and on every change). |
When it stops matching. |
Write the query without spaces: media:(prefers-color-scheme:dark). |
event:name |
Every time an event called name is dispatched on the element. |
Briefly, to restart the animation. |
Lets your code choose the moment without touching data-effect-active. |
vt |
Every time a VB.swap() view transition has committed the new DOM. |
Briefly, to restart the animation. |
Pairs with data-transition="effect:class". |
view-progress, view-progress:entry|exit|cover|contain |
Continuously: the animation follows the element's progress through the viewport (CSS animation-timeline: view()). |
— |
Entrance effects only (fade-in, slide-up, slide-in, pop, fade-in slide-up). Without timeline support it falls back to scroll. |
scroll-progress |
Continuously: the animation follows the whole page's scroll position (animation-timeline: scroll()). |
— |
Without timeline support it falls back to scroll. |