Features/Interactions

Pointer effects (follow and custom cursor)

Magnetic and tilt effects that follow the pointer, plus a site-wide custom cursor that changes over elements.

The Follow action pulls, tilts and grows an element toward the pointer while it is over it, and eases it back on leave. The On Pointer event maps the pointer's position across an element to an animation. The Cursor action adds one custom cursor for the whole site that follows the pointer and takes a state from the element under it (data-cursor="name" gives the class dh-cursor-name). Use them for magnetic buttons, tilting cards and branded cursors.

How it works

  • Follow: translate 0-200 px (default 12), rotate 0-60 deg, scale 0.5-2, lerp 0.01-1 (default 0.15). Writes translate, rotate and scale as separate properties.
  • Cursor: lerp 0.01-1 (default 0.2); run once on the page ready event; the native hand cursor is hidden for elements with a cursor state.
  • On Pointer event: axis x, y or distance; delay and duration are shares of the pointer travel (max 10000).
  • Reduced motion: Follow does nothing; the cursor sits on the pointer without easing.

When to use it

  • Magnetic CTA button
  • 3D tilt on product cards
  • Custom cursor that grows over links

Limitations

  • One custom cursor per site.

Availability

  • Works in Designer.
  • Included in every plan.

How to use it.

  1. Add an interaction on On Pointer (enter and leave) with a Follow action.
  2. For a cursor, add a Cursor action on the page ready event and set data-cursor on elements.

Related features.

No card needed

Build it today.Pay when it goes live.

Every feature is unmetered while you build. Checkout opens the first time you publish.