Smooth Cursor
Dot-and-ring custom cursor; the ring trails on a spring and grows over links and buttons.
- 1.9 KB gzipped
- Deps: react-dom, motion/react
- Reduced-motion safe
- Base UI & Radix compatible
Move your mouse around this box
The ring trails behind the dot and grows over links and buttons.
Installation
pnpm dlx shadcn@latest add https://velora.colorlib.com/r/smooth-cursor.jsonAdds components/velora/smooth-cursor.tsx, installs motion.
Examples
CTA card
A call-to-action card with buttons and links that make the ring grow.
Early access
Ship your next launch page this week
Join 4,200 builders getting new components every Friday.
Props
| Prop | Type | Default |
|---|---|---|
containerLimit the cursor to this element; defaults to the whole document | React.RefObject<HTMLElement | null> | — |
hideNativeCursorHide the system cursor while the custom one is showing | boolean | true |
interactiveSelectorCSS selector for elements that make the ring grow | string | "a, button, [role=button], input, select, textarea, label, summary" |
dotClassNameClasses for the dot | string | — |
ringClassNameClasses for the trailing ring | string | — |
Accessibility
- Reduced motion
- The ring snaps to the dot instead of trailing, and grows or shrinks without easing.
- Keyboard
- Decorative — nothing to operate.
- Screen readers
- The dot and ring are aria-hidden and never take pointer events; nothing is announced.