Dot Repel
A springy dot grid the pointer lights up, flicks and drags through like jelly, with a shockwave on click.
pixikit.com/docs/effects/dot-repel
Customize
Base color
Active color
Shape
Dot size5px
Gap18px
Proximity140px
Strength1.0
Bounce0.60
Tension0.40
Return duration0.8s
Shock radius320px
Shock strength5.0
Swell0.8
Stretch0.5
Glow0.50
Fade0.00
Opacity1.00
Intro
Mouse interaction
Click shock
Paused
Props
24| Name | Type | Default | Description |
|---|---|---|---|
baseColor | string | "#3a3446" | A resting dot's colour; any CSS colour, `currentColor` and variables included. |
activeColor | string | "#ffffff" | The colour dots light up to while they move or sit near the pointer. |
shape | "circle" | "square" | "circle" | The shape of each dot. |
dotSize | number | 5 | A dot's size in pixels at rest. |
gap | number | 18 | The space between dots, in pixels. |
proximity | number | 140 | The radius around the pointer that lights and pushes dots, in pixels. |
strength | number | 1 | How hard a moving pointer pushes the dots. |
bounce | number | 0.6 | How much dots overshoot and wobble as they settle, 0 to 1. |
tension | number | 0.4 | How strongly a dot pulls on its neighbours, so a push travels through the grid like jelly. |
returnDuration | number | 0.8 | Roughly how long dots take to settle back, in seconds. |
shockRadius | number | 320 | How far a click shockwave travels, in pixels. |
shockStrength | number | 5 | How hard a click shockwave pushes. |
swell | number | 0.8 | How much dots grow while they are lit. |
stretch | number | 0.5 | How much moving dots stretch into short streaks along their motion. |
glow | number | 0.5 | The soft halo around lit dots, 0 to 1. |
fade | number | 0 | Fades the grid out toward the edges, 0 to 1. |
opacity | number | 1 | The opacity of the whole grid. |
intro | boolean | true | Pops the dots in from the centre when the grid first appears. |
mouseInteraction | boolean | true | Lets the pointer push the dots and light them up. |
clickShock | boolean | true | Sends a shockwave out from each click. |
paused | boolean | false | Freezes the animation. |
dpr | number | None | The highest device pixel ratio drawn; the screen's by default, capped at 2. |
className | string | None | |
style | CSSProperties | None | Inline styles for the container. |