Ghost Cursor

A little ghost haunts your section: it follows lazily, gets scared on click, hides when you stop.

  • Zero dependencies
  • React + Tailwind
  • Accessible
  • Reduced-motion aware
Open in v0

Preview

Animated · Full motion: idle animation, physics and effects. animated (default)

Spring-follow physics with a trailing offset, eyes that track the pointer, a scared state that flips the spring so it flees, and a hiding state when you stand still for a few seconds.

Installation

$ npx shadcn@latest add https://pickui.guetix.com/r/ghost-cursor.json

Uses the shadcn CLI. It creates components/pickui/ghost-cursor.tsx and installs nothing else.

Usage

example.tsx
import { GhostCursor } from "@/components/pickui/ghost-cursor";

export default function Example() {
  return <GhostCursor />;
}
Halloween404 pagesPlayful hero sections

Props

PropTypeDefaultDescription
childrenReactNode—Content it haunts.
colorstring—Ghost color.
animatedbooleantruefalse = the calm “Regular” version (no idle or ambient motion).

Accessibility

  • Decorative ghost is aria-hidden; mood changes are announced politely.