Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/nightshade/llms.txt
Use this file to discover all available pages before exploring further.
FamiliarCursor replaces the browser’s default cursor with a two-part witch-themed cursor that follows the mouse using Framer Motion spring physics. A small teal dot tracks the pointer precisely, while a larger plum witch shape trails slightly behind — creating the sensation of a creature following your hand rather than a mechanical pointer.
Touch device handling
The component performs a coarse-pointer media query check before rendering anything. On touch devices (mobile and tablet), no cursor elements are rendered, preserving the native touch experience:This check runs synchronously on component mount. On coarse-pointer devices the component returns
null immediately, so no event listeners or motion values are created.The two cursor parts
The cursor is composed of two independent Framer Motion elements that track the mouse position in different ways:Small dot
An 8×8px (
w-2 h-2) bg-witch-turquoise circle that uses animate with a short tween transition (duration: 0.1, ease: backOut). It responds nearly instantly, always sitting exactly on the pointer hotspot.Witch SVG
A 32×32px plum SVG shape that uses
style={{ x: springX, y: springY }} — Framer Motion spring values. It lags behind the real pointer, drifting in to catch up with organic deceleration.fixed top-0 left-0 with pointer-events-none so they never interfere with clicks or hovers on the underlying page.
Spring configuration
The witch SVG’s following motion is controlled by auseSpring call with a hand-tuned config:
| Parameter | Value | Effect |
|---|---|---|
damping | 25 | Controls how quickly the oscillation settles. Higher values stop the overshoot sooner. |
stiffness | 150 | Controls the pull strength toward the target. Higher values make the cursor follow more eagerly. |
mass | 0.5 | A lighter mass reaches the target faster, making the lag feel brief rather than sluggish. |
mousemove event, springX and springY are updated to clientX - 16 and clientY - 16 (offsetting by half the SVG’s 32px width to center it on the pointer).
Hover detection
Amouseover listener checks whether the event target — or any of its ancestors — is an interactive element:
isHovered is true, both cursor parts play their hover animations:
| Part | Hover animation |
|---|---|
| Small dot | scale: 2, opacity: 0.8 |
| Witch SVG | rotate: 15deg, scale: 1.2 |
The witch SVG shape
The SVG is a flame or teardrop silhouette with two wing-like side paths and a small amber circle for the eye:text-witch-plum opacity-80 drop-shadow-[0_0_8px_rgba(88,28,135,0.8)], so the SVG inherits the plum color and glows slightly via the drop shadow.
Customization
Spring feel — increasestiffness (e.g. 250) for a snappier follow; decrease damping (e.g. 15) for more bounce on arrival.
Hover selectors — add extra selectors to the hover detection block to trigger the enlarged state on other interactive elements, such as [data-hoverable] or input.
SVG shape — replace the <path> elements inside the witch SVG with any other shape. Keep the viewBox="0 0 24 24" and fill="currentColor" so the color inheritance continues to work.
Dot color — change bg-witch-turquoise on the small dot to any other design token for a different accent color.