Motion+

Cursor trail velocity

An example of creating a cursor trail with velocity-based inertia animations in Motion for React.

React
Tutorial time
5 min
Difficulty

Tutorial

Introduction

The Cursor trail velocity example shows how to spawn images as the user's cursor moves around the screen.

This example is a twist on the original Cursor trail example, where the pointer velocity is recorded at the moment of image spawn and this is fed into a type: "inertia" animation.

Related examples

Latest in React

Motion+

Unlock all 400+ examples

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