Make an element follow the pointer (with optional smoothing and axis lock) using the follow-mouse trigger.
Where: Right sidebar → Interactions → Pointer → Follow mouse — Add a Follow mouse interaction
Key ideas
- Axis & scope: Lock to x/y/both; scope to the element or the whole window.
- Smoothing: A smooth factor eases the follow for a trailing feel.
- Distinct trigger: follow-mouse is its own trigger type — switching to/from it rebuilds the animation type, not just the trigger.
Steps
- Select the element to move.
- Add a "Follow mouse" interaction (Pointer category).
- Set axis, scope, and smoothing.
- Preview by moving the pointer.