Glass Cursor
Glass-like cursor trail with refraction and blur
glass-cursor-tw
Customize
Tweak the props liveBasic
0
0.04
40
1
#000000Shape & Refraction
0.3
0.6
0.3
0.3
Lighting & Warp
0.15
0.2
25
5
Props
| Name | Type | Default | Description |
|---|---|---|---|
width | string | number | "100%" | Container width in pixels or CSS value |
height | string | number | "100%" | Container height in pixels or CSS value |
className | string | undefined | Additional CSS classes for the container |
children | React.ReactNode | undefined | Content rendered above the effect |
src | string | "https://images.unsplash.com/..." | Image source URL to apply the glass effect on |
dampening | number | 0 | Cursor follow smoothness (0 = instant, 1 = very laggy) |
blobSize | number | 0.04 | Metaball radius in UV space |
trailLength | number | 40 | Number of active trail points (max 40) |
tailFade | number | 0.3 | Tail shrink curve (higher = faster fade) |
threshold | number | 0.6 | Metaball iso-surface threshold |
refraction | number | 0.3 | Gradient-based lens refraction strength |
blurSpread | number | 0.3 | Blur sample spacing |
borderGlow | number | 0.15 | Border rim brightness |
specularGain | number | 0.2 | Specular highlight intensity |
blobWarpAmount | number | 25 | Organic warp distortion amount on trail |
blobWarpScale | number | 5 | Spatial frequency of warp noise |
backgroundColor | string | "#000000" | Background color hex |
opacity | number | 1 | Master opacity |
widthstring | numberContainer width in pixels or CSS value
Default:
"100%"heightstring | numberContainer height in pixels or CSS value
Default:
"100%"classNamestringAdditional CSS classes for the container
Default:
undefinedchildrenReact.ReactNodeContent rendered above the effect
Default:
undefinedsrcstringImage source URL to apply the glass effect on
Default:
"https://images.unsplash.com/..."dampeningnumberCursor follow smoothness (0 = instant, 1 = very laggy)
Default:
0blobSizenumberMetaball radius in UV space
Default:
0.04trailLengthnumberNumber of active trail points (max 40)
Default:
40tailFadenumberTail shrink curve (higher = faster fade)
Default:
0.3thresholdnumberMetaball iso-surface threshold
Default:
0.6refractionnumberGradient-based lens refraction strength
Default:
0.3blurSpreadnumberBlur sample spacing
Default:
0.3borderGlownumberBorder rim brightness
Default:
0.15specularGainnumberSpecular highlight intensity
Default:
0.2blobWarpAmountnumberOrganic warp distortion amount on trail
Default:
25blobWarpScalenumberSpatial frequency of warp noise
Default:
5backgroundColorstringBackground color hex
Default:
"#000000"opacitynumberMaster opacity
Default:
1