Browse components
Ghost Cursor
Translucent, drifting echoes of the cursor trail behind the pointer like afterimages.
Installation
npx shadcn@latest add @glint-ui/ghost-cursorFirst time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glint-ui-seven.vercel.app/r/ghost-cursor.json
Usage
import { GhostCursor } from "@/components/ui/ghost-cursor";
<GhostCursor className="h-96" shape="ghost">
<p>Boo.</p>
</GhostCursor>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | Content under the cursor. |
| color | string | "#ffffff" | Color of the live cursor. |
| ghostColor | string | "#a78bfa" | Tint of the trailing ghosts. |
| count | number | 6 | Number of ghost copies. |
| spacing | number | 4 | Frames of delay between consecutive ghosts. |
| size | number | 28 | Cursor size in px. |
| shape | "arrow" | "ghost" | "dot" | "arrow" | Cursor shape. |
| hideCursor | boolean | true | Hide the native cursor inside the container. |
| className | string | — | Extra classes for the root element. |