CursorTrails adds pointer trailing effect to your webpage.
DEMO Sandbox: https://codesandbox.io/s/cursor-trail-demo-fqsd4?file=/src/index.js
npm install cursor-trails
import and call
import CursorTrail from "cursor-trails";
CursorTrail({
container: document.body,
//images: [$PROVIDE_YOUR_IMAGE_URLS]
rate: 0.5,
size: 40,
life: 1.5,
speed: 1.2
});
The container where trailing effect should be shown
URL of images to be shown as trailing effect
0 ~ 1 number of probability a trailing image is generated upon pointer moving event
size of generated trailing image
duration of trailing image appearing on screen
moving speed of trailing image
This repo was forked from https://github.com/tholman/cursor-effects