Introduction

What PointerUI is, what it deliberately is not, and the one architectural idea the whole library rests on.

PointerUI is a set of mouse-follower components you copy into your project. There is no package to install and nothing to keep updated — the shadcn CLI writes the source into your repo, and from that moment it is your code.

Six variants ship today: dot-ring, magnetic, spotlight, blend, trail-dots and trail-canvas. They are built on GSAP and share a single engine.

The one idea

A cursor follower is not a widget. It is one effect for the whole page, driven by an event that fires up to a thousand times a second on a fast pointer. Almost every implementation of this pattern treats each follower as an independent component with its own listener, its own requestAnimationFrame loop, and its own React state for the coordinates. That works until you add the second one.

PointerUI inverts it. One engine owns the pointer, and layers register with it:

  • one pointermove listener for the page, not one per component
  • one gsap.ticker callback, not one requestAnimationFrame loop per component
  • one shared pointer state object that never enters React state

The consequence is that variants compose. Mount dot-ring and trail-dots together and you get one listener and one ticker, because both are reading the same pointer state. That is the thing a copied CodePen cannot do.

What this is not

Not a physics library. The lag you see in dot-ring is two different tween durations, 0.15s against 0.6s. There is no spring solver, no velocity integration, no per-frame maths beyond what GSAP already does.

Not a React animation library. Nothing here re-renders on pointer movement. If you are looking for something that hands you coordinates as state, this is the wrong library — that design is the reason these effects usually drop frames.

Not for touch. On a device without a fine pointer the components render nothing and register nothing. There is no cursor to follow, and paying for the code would be rude.

Requirements

React 19 and GSAP 3.15 or newer. Next.js App Router is supported and is what the docs site itself runs on; every file in the library starts with 'use client'.

GSAP has been free for commercial use, including every plugin, since Webflow's April 2025 announcement. There is nothing to license.

Where to go next

Installation covers the CLI, the manual route, and what gets written where. Engine explains scoped mode and the performance rules, which is the page to read before writing your own variant. Data attributes is the full reference for the markup contract, and Accessibility covers reduced motion, touch and keyboard behaviour.