card background pattern
Level 2

Animating React with Framer Motion

Unlock Full Course

$49.99 $39.99



Drag and Drag Constraints

As we dive deeper into gesture-based animations, we will look at dragging with Framer Motion.



5 months ago

@Erik Hals You can also prevent the image from dragging by using

pointer-events: none

on the img css

5 months ago

@Erik Hals nice find!!

Erik Hals
updated 6 months ago

In Chrome, the card sometimes froze when trying to drag it, as the img itself is draggable to the desktop. Found it can be prevented by adding -webkit-user-drag: none; to the img in Elements.js.

Something to say?

Become a Pro