Move Your Cursor
Notice the elastic gradient orb smoothly trailing behind your mouse movements.
Overview
The CursorTrail (or Blob Follower) is a heavily utilized effect in creative web design. It acts as an organic, ambient background aura that trails behind the user's cursor. Using framer-motion's spring physics, it lags slightly behind the actual cursor position, creating a sense of weight and elasticity.
Usage
import { CursorTrail } from "@/components/creative/cursor-trail"
export default function Layout({ children }) {
return (
<div className="relative min-h-screen bg-black overflow-hidden">
<CursorTrail color="#ec4899" size={200} blur={80} />
<main className="relative z-10">
{children}
</main>
</div>
)
}
Usage Guide
1. Import the Component
Import the component into your React or Next.js page:
import { CursorTrail } from "@/components/creative/cursor-trail";
2. Implementation Example
Render the component and customize its behavior by passing props:
import { CursorTrail } from "@/components/creative/cursor-trail";
export default function Example() {
return (
<div className="w-full flex items-center justify-center p-8">
<CursorTrail
color="example"
size{10}
blur{10}
/>
</div>
);
}