Scribble Cursor
A blue pen line that chases the pointer and redraws itself every frame with random control points, so it reads as a hand-drawn scribble. A chain of spring points follows the cursor and the line clears 100ms after the pointer stops. Tracks the whole page or only a hovered element. Canvas 2D, no dependencies.
npx shadcn@latest add @compronents/scribble-cursorInstalls from ui.aryank.space. Needs a registry token and a one-time @compronents entry in components.json. The docs walk through both.
Checking access…
| Prop | Type | Default | Description |
|---|---|---|---|
| color / strokeWidth | string / number | "#3DA8FF" / 2 | Stroke colour and width in px. |
| points | number | 8 | Spring points in the chain, minimum 2. More gives a longer tail. |
| tension / friction | number / number | 0.95 / 0.38 | Pull towards the point ahead, and the share of velocity kept each frame. |
| jitter | number | 65 | Max random control-point offset in px. 0 draws a smooth line. |
| tracking | "global" | "hover" | "global" | Draw for movement anywhere, or only while the pointer is over this component's children. |
| container | RefObject<HTMLElement | null> | — | Keep the canvas and global tracking inside this element. Omit for a fixed canvas over the viewport. |
| className / style / children | string / CSSProperties / ReactNode | — | Wrapper props; children are the hover target. |
colorcolorStroke colour.
jittersliderMax random control-point offset in px.
None.