Motion+

Cursor: Floating target

An example of creating a floating target with rotating text and hover effects using the Motion+ Cursor and usePointerPosition.

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

Introduction

The Floating Target example creates a rotating button that reacts to your cursor with a smooth spring animation. As well as creating a custom usePointerReaction hook, we'll use several Motion APIs: