Motion+

Cursor trail velocity

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

Time
5 min
Difficulty
Intermediate
Access
Motion+
>Live exampleOpen in new tab

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.