Motion+

Drag: Lock direction

An example of locking the drag direction of an element based on its initial drag direction using Motion for React's dragDirectionLock prop.

React
>Live exampleOpen

Related examples

Latest in React

Motion+

Unlock all 370+ examples

  • Source code for every Plus example.
  • Provide examples direct to your agent via Motion's MCP.
  • Lifetime access to new examples and APIs.