Toggle Sidebar B
AppearanceLight & dark mode D

Ghost Cursor

Semi-transparent ghost cursor that smoothly follows the real cursor with a trailing effect.

Default

Move the pointer over the stage to leave a smoky trail. It reacts to the parent element, so it only follows the pointer inside the area it is placed in. Color, trail, bloom and fade are wired to the controls underneath.

Light previewReplay previewOpen in new tab
Boo!

Customize

Color
Trail Length50
Inertia0.5
Grain Intensity0.05
Bloom Strength0.1
Bloom Radius1
Bloom Threshold0.03
Brightness2
Fade Delay (ms)1000
Fade Duration (ms)1500

API Reference

GhostCursor

PropTypeDefaultDescription
trailLengthnumber50Number of points stored for the cursor trail (longer = longer smear).
inertianumber0.5Velocity retention when the pointer stops. Higher values make the cursor glide longer.
grainIntensitynumber0.05Strength of the film grain post-processing pass.
bloomStrengthnumber0.1UnrealBloom effect strength.
bloomRadiusnumber1.0UnrealBloom radius controlling spread of glow.
bloomThresholdnumber0.025UnrealBloom threshold; lower includes more pixels in bloom.
brightnessnumber1Final brightness multiplier applied to the effect color.
colorstring'#B497CF'Base color of the ghost cursor effect.
mixBlendModestring'screen'CSS mix-blend-mode used when compositing with page content.
edgeIntensitynumber0Darkening near edges of the canvas. 0 = none, 1 = strongest.
maxDevicePixelRationumber0.5Upper cap for devicePixelRatio to control render cost on high-DPR displays.
targetPixelsnumberauto (~1.3e6 desktop, ~0.9e6 touch)Pixel budget. Resolution is dynamically scaled to keep total pixel count under this budget.
fadeDelayMsnumberauto (1000 desktop, 500 touch)Idle delay before the trail starts to fade after pointer leaves/stops.
fadeDurationMsnumberauto (1500 desktop, 1000 touch)Duration of the trail fade-out once the delay has elapsed.
zIndexnumber10z-index applied to the canvas for layering above/below content.

Accessibility

Keyboard shortcuts and ARIA behavior.

  • Purely decorative and non-interactive (pointer-events: none). It does not replace the system cursor.