More cursor effects in Pro
Cursor trails and pointer effects that give a site its own feel.
src | 'https://images.unsplash.com/...' | Image URL the ripples distort. Cover fitted to the container. | |
brushSize | 150 | Diameter of each ripple the pointer lays down, in px. | |
strength | 0.2 | How far the image is pushed, as a fraction of its size. | |
swirl | Full turns the push direction sweeps through as a ripple builds. 0 gives a flat push, higher folds the image into caustics. | ||
rings | 4 | Concentric swells inside each ripple. 0 is a single plain blob. | |
spread | 5 | How many times its own size a ripple grows to before it dies. | |
fade | 3 | How long a ripple survives, in seconds. | |
spacing | 15 | Pointer travel between ripples, in px. Higher leaves a sparser trail. | |
dispersion | Chromatic split between the red and blue channels as they refract. | ||
glint | Sheen riding the shoulders of each ripple. | ||
tint | #a855f7 | Colour the disturbed water takes on. | |
tintAmount | 0.1 | How strongly the tint colours the disturbed water. | |
highlightColor | #ffffff | Colour of the sheen. | |
grayscale | Drain the colour out of the image so the folds read on tone alone. | ||
trigger | 'hover' | 'click' | 'both' | 'hover' | What disturbs the surface: motion, clicks, or both. |
clickStrength | 2 | How much larger a click ripple starts than a hover one. | |
quality | 'low' | 'medium' | 'high' | 'low' | Resolution of the displacement buffer. Lower trades crispness for fill rate. |
enabled | Toggle the effect on or off. | ||
| Extra classes on the container. |
srcstringImage URL the ripples distort. Cover fitted to the container.
'https://images.unsplash.com/...'brushSizenumberDiameter of each ripple the pointer lays down, in px.
150strengthnumberHow far the image is pushed, as a fraction of its size.
0.2swirlnumberFull turns the push direction sweeps through as a ripple builds. 0 gives a flat push, higher folds the image into caustics.
ringsnumberConcentric swells inside each ripple. 0 is a single plain blob.
4spreadnumberHow many times its own size a ripple grows to before it dies.
5fadenumberHow long a ripple survives, in seconds.
3spacingnumberPointer travel between ripples, in px. Higher leaves a sparser trail.
15dispersionnumberChromatic split between the red and blue channels as they refract.
glintnumberSheen riding the shoulders of each ripple.
tintstringColour the disturbed water takes on.
#a855f7tintAmountnumberHow strongly the tint colours the disturbed water.
0.1highlightColorstringColour of the sheen.
#ffffffgrayscalebooleanDrain the colour out of the image so the folds read on tone alone.
trigger'hover' | 'click' | 'both'What disturbs the surface: motion, clicks, or both.
'hover'clickStrengthnumberHow much larger a click ripple starts than a hover one.
2quality'low' | 'medium' | 'high'Resolution of the displacement buffer. Lower trades crispness for fill rate.
'low'enabledbooleanToggle the effect on or off.
Extra classes on the container.
Dependencies
1 required package
npm install ogl


