Electric Vijdi Cursor
A white-hot violet bolt that snaps through recent pointer movement, flickers briefly at rest, and never intercepts page interactions.
Installation#
pnpm dlx shadcn@latest add @davinciui/electric-vijdi-cursorUsage#
API Reference#
| Prop | Type | Default |
|---|---|---|
colorElectrical body and glow color. | string | "#A855F7" |
intensityOverall brightness multiplier. | number | 1 |
boltWidthWhite-hot core width in pixels. | number | 1.2 |
glowSizeOuter bloom size multiplier. | number | 1 |
trailLifetimeVisible movement history in milliseconds. | number | 240 |
jitterJagged perpendicular displacement in pixels. | number | 9 |
branchIntensityAmount and length of sparse secondary arcs. | number | 1 |
sparkIntensityAmount of tiny, fast-decaying sparks. | number | 1 |
speedResponseHow strongly cursor velocity extends and energizes the bolt. | number | 1 |
qualityBalances bolt detail, bloom, and DPR cap. | "low" | "medium" | "high" | "medium" |
zIndexOverlay stacking order. | number | 9999 |
disabledTurns the decorative overlay off without unmounting it. | boolean | false |
containerRefOptionally constrain pointer tracking and rendering to a positioned host. | RefObject<HTMLElement> | — |
classNameAdditional class name applied to the canvas. | string | — |
Accessibility#
The canvas is aria-hidden and pointer-events none, so it contributes nothing to focus order or the accessibility tree and never intercepts interactions. The effect is skipped entirely on coarse pointers.
Motion#
RequestAnimationFrame draws the bolt from pointer samples; trailLifetime, jitter, speedResponse, branchIntensity, sparkIntensity, and quality tune it, with no easing props. It checks prefers-reduced-motion, ignores pointer input, and clears the trail and sparks when reduction is active.
Known constraints#
- Coarse pointers skip the canvas entirely, so there is no touch equivalent.
- Reduced motion keeps the effect idle instead of running a subtler animation.
- The canvas is decorative and should sit behind the content it accompanies.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

