WebberUI

Smooth Follow Cursor

A spring-physics custom cursor with a deforming blob follower.

A custom cursor driven by spring physics: the center dot sticks to the fingertip while the outer ring converges behind it, stretching and deforming along the direction of travel according to cursor speed to produce a "soft-bodied" trailing tail.

Loading preview…
npx shadcn@latest add https://webberui.com/r/smooth-follow-cursor.json

Playground

Tune the props live — the code snippet updates as you go, so you can dial in the look you want before copying it.

38
7
0.4
<SmoothFollowCursor />

Installation

npx shadcn@latest add https://webberui.com/r/smooth-follow-cursor.json

Or, once registries are configured in components.json, install it as @webberui/smooth-follow-cursor.

Usage

import { SmoothFollowCursor } from "@/components/ui/smooth-follow-cursor";

<SmoothFollowCursor color="#8b5cf6" blend className="relative h-[340px] w-full">
  {/* your content */}
</SmoothFollowCursor>;

The cursor effect only applies inside this container: the container applies cursor-none to hide the native cursor, which comes back as soon as you leave. Touch devices (pointer: coarse) disable it automatically and keep the native cursor.

Props

PropTypeDefaultDescription
colorstring"#6366f1"Blob outer ring color
dotColorstring"#6366f1"Center dot color
sizenumber38Outer ring diameter (px)
dotSizenumber7Center dot diameter (px)
deformbooleantrueWhether to stretch and deform along the direction of travel by speed
stretchnumber0.4Maximum stretch amount (01)
blendbooleanfalseInverts and blends colors with mix-blend-difference
childrenReactNodeContainer content

Accessibility

  • When the user has "reduce motion" enabled at the system level, the custom cursor is disabled and the native cursor is kept
  • Touch devices disable it automatically, and overflow-hidden makes sure the outer ring cannot spill out of the container while deforming
  • The cursor layer is a purely visual overlay carrying aria-hidden and pointer-events-none, so it does not affect interaction with the layer underneath

On this page