niceui

Custom Cursor Effects for React

Animated custom cursors, cursor trails and pointer effects for React and Tailwind CSS. Smooth spring-follow cursors, hover labels, magnetic buttons, image trails and spotlight cards that react to the mouse. Each effect switches itself off on touch screens and respects reduced motion.

7 free components · React + Tailwind CSS · MIT licensed

FAQ

How do I make a custom mouse cursor in React?

Hide the native cursor on a container, render an absolutely positioned element and move it toward the pointer each animation frame with a spring. The Custom Cursor component does this and adds hover labels and magnetic snapping.

Do custom cursors work on mobile?

Touch screens have no hovering pointer, so these effects detect coarse pointers and turn themselves off, leaving the normal behaviour.

Will a cursor effect slow my site down?

They animate with transforms or a single canvas and pause when off screen, so the cost is small.

Related topics