Mouse Repel Grid
Customize
Props
| Property | Type | Default | Description |
|---|---|---|---|
gridSpacing | number | 28 | Pixel distance between grid intersection points. |
curveStrength | number | 0 | Barrel-distortion amount applied to the resting grid (0 = flat). |
diagonals | boolean | false | Draw diagonal lines across each grid cell. |
repelRadius | number | 100 | Cursor influence radius in pixels. |
force | number | 14 | Maximum pixel displacement applied at the cursor centre. |
easeSpeed | number | 0.1 | Lerp factor per frame — higher = snappier response. |
damping | number | 0.85 | Velocity damping per frame (0–1). Lower = bouncier. |
springK | number | 0.08 | Spring constant that pulls nodes back to their origin. |
waveAmplitude | number | 0 | Vertical wave offset amplitude in pixels (0 = disabled). |
waveSpeed | number | 1 | Speed multiplier for the wave animation. |
ambientNoise | boolean | false | Add per-node sinusoidal noise for an organic breathing look. |
ambientNoiseAmplitude | number | 4 | Pixel amplitude of the ambient noise. |
ambientNoiseSpeed | number | 0.3 | Speed multiplier of the ambient noise oscillation. |
animationMode | "none" | "breathing" | "pulse-glow" | "shimmer" | "auto-ripple" | "none" | Idle animation applied to the grid continuously. |
animationSpeed | number | 1 | Speed multiplier for the chosen animation mode. |
animationIntensity | number | 1 | Intensity / amplitude multiplier for the chosen animation mode. |
lineWidth | number | 1 | Base stroke width in pixels. |
glowIntensity | number | 0.7 | Glow brightness near the cursor (0–1). |
glowBlur | number | 0 | Canvas shadowBlur radius for a soft bloom effect (0 = disabled). |
lineColor | string | "#d35af8" | Base line colour (hex / rgb / CSS variable). |
glowColor | string | "#b8a0ff" | Line colour at maximum glow intensity. |
backgroundColor | string | "transparent" | Canvas background. Use "transparent" to inherit the parent background. |
colorMode | "solid" | "gradient" | "rainbow" | "solid" | Line colour strategy. |
gradientColors | string[] | ["#5a4cff","#d35af8"] | Two or more hex stops used when colorMode is "gradient". |
gradientDirection | "horizontal" | "vertical" | "diagonal" | "radial" | "horizontal" | Direction of the gradient or rainbow sweep. |
rainbowSpeed | number | 0.2 | Hue cycle speed when colorMode is "rainbow". |
rainbowSaturation | number | 0.7 | HSL saturation for rainbow mode (0–1). |
rainbowLightness | number | 0.6 | HSL lightness for rainbow mode (0–1). |
vignette | boolean | false | Overlay a radial vignette that fades toward the edges. |
vignetteStrength | number | 0.6 | Vignette opacity (0–1). |
pulseOnClick | boolean | false | Emit a ripple pulse outward from the click position. |
className | string | "" | Extra CSS classes forwarded to the wrapper div. |
style | object | {} | Inline styles forwarded to the wrapper div. |
gridSpacingnumberPixel distance between grid intersection points.
28curveStrengthnumberBarrel-distortion amount applied to the resting grid (0 = flat).
0diagonalsbooleanDraw diagonal lines across each grid cell.
falserepelRadiusnumberCursor influence radius in pixels.
100forcenumberMaximum pixel displacement applied at the cursor centre.
14easeSpeednumberLerp factor per frame — higher = snappier response.
0.1dampingnumberVelocity damping per frame (0–1). Lower = bouncier.
0.85springKnumberSpring constant that pulls nodes back to their origin.
0.08waveAmplitudenumberVertical wave offset amplitude in pixels (0 = disabled).
0waveSpeednumberSpeed multiplier for the wave animation.
1ambientNoisebooleanAdd per-node sinusoidal noise for an organic breathing look.
falseambientNoiseAmplitudenumberPixel amplitude of the ambient noise.
4ambientNoiseSpeednumberSpeed multiplier of the ambient noise oscillation.
0.3animationMode"none" | "breathing" | "pulse-glow" | "shimmer" | "auto-ripple"Idle animation applied to the grid continuously.
"none"animationSpeednumberSpeed multiplier for the chosen animation mode.
1animationIntensitynumberIntensity / amplitude multiplier for the chosen animation mode.
1lineWidthnumberBase stroke width in pixels.
1glowIntensitynumberGlow brightness near the cursor (0–1).
0.7glowBlurnumberCanvas shadowBlur radius for a soft bloom effect (0 = disabled).
0lineColorstringBase line colour (hex / rgb / CSS variable).
"#d35af8"glowColorstringLine colour at maximum glow intensity.
"#b8a0ff"backgroundColorstringCanvas background. Use "transparent" to inherit the parent background.
"transparent"colorMode"solid" | "gradient" | "rainbow"Line colour strategy.
"solid"gradientColorsstring[]Two or more hex stops used when colorMode is "gradient".
["#5a4cff","#d35af8"]gradientDirection"horizontal" | "vertical" | "diagonal" | "radial"Direction of the gradient or rainbow sweep.
"horizontal"rainbowSpeednumberHue cycle speed when colorMode is "rainbow".
0.2rainbowSaturationnumberHSL saturation for rainbow mode (0–1).
0.7rainbowLightnessnumberHSL lightness for rainbow mode (0–1).
0.6vignettebooleanOverlay a radial vignette that fades toward the edges.
falsevignetteStrengthnumberVignette opacity (0–1).
0.6pulseOnClickbooleanEmit a ripple pulse outward from the click position.
falseclassNamestringExtra CSS classes forwarded to the wrapper div.
""styleobjectInline styles forwarded to the wrapper div.
{}Crafted withbyMohammad Tasin
