hover-* / click-* - loop triggers
Prefix any loop name to bind it to the pointer: .hover-shake runs while hovered, .click-bell plays one cycle per press. The engine kills and rebuilds the tween on each trigger so nothing queues up.
Demo
hover-shake
hover-pulse
click-bounce
click-spin-cw
Built-in button behaviours
.click-hoverLifts on hover, dips on press (translateY).click-expandScales up on hover, pops on pressctime-NPress/hover tween durationamount-NLift px / expand scale×10click-hover
Hit areas & coexistence
.wrapdiv wraps the element in a stable parent that owns pointer events, so animating scale never shifts the hit area under the cursor. .compatibility pauses an always-on loop while a hover/click interaction is active, resuming it afterwards - both write to the same transforms.
html
<button class="hover-shake wrapdiv">…</button>
<button class="compatibility pulse hover-jump">…</button>