Cursor Follow

Smooth cursor-following blob for delightful feedback.

Open in v0~1.2 kB

Last updated: March 7, 2026

Portrait of a person sitting in a chair
A young man with curly hair

Installation

npx smoothui-cli add cursor-follow

Features

  • Tracks pointer with spring animation
  • Blend/blur styling options
  • Performance-aware updates
  • Easy theming

Accessibility

ARIA Attributes

AttributeElementPurpose
role="application"ContainerIndicates the region is an interactive application widget
tabIndex={0}ContainerMakes the container focusable for keyboard/focus events

Screen Reader

  • The component listens to onFocus and onBlur events in addition to mouse events, allowing data-cursor-text content to be triggered by focus.
  • The cursor bubble itself is purely decorative and uses pointer-events: none, so it does not interfere with assistive technology.

Reduced Motion

This component respects the prefers-reduced-motion media query via useReducedMotion from Motion. When reduced motion is preferred, the cursor bubble appears instantly without scale or opacity entrance animations. The spring-based position tracking still operates via motion values.

Props