Skip to content
PixiKit

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
NameTypeDefaultDescription
baseColorstring"#3a3446"A resting dot's colour; any CSS colour, `currentColor` and variables included.
activeColorstring"#ffffff"The colour dots light up to while they move or sit near the pointer.
shape"circle" | "square""circle"The shape of each dot.
dotSizenumber5A dot's size in pixels at rest.
gapnumber18The space between dots, in pixels.
proximitynumber140The radius around the pointer that lights and pushes dots, in pixels.
strengthnumber1How hard a moving pointer pushes the dots.
bouncenumber0.6How much dots overshoot and wobble as they settle, 0 to 1.
tensionnumber0.4How strongly a dot pulls on its neighbours, so a push travels through the grid like jelly.
returnDurationnumber0.8Roughly how long dots take to settle back, in seconds.
shockRadiusnumber320How far a click shockwave travels, in pixels.
shockStrengthnumber5How hard a click shockwave pushes.
swellnumber0.8How much dots grow while they are lit.
stretchnumber0.5How much moving dots stretch into short streaks along their motion.
glownumber0.5The soft halo around lit dots, 0 to 1.
fadenumber0Fades the grid out toward the edges, 0 to 1.
opacitynumber1The opacity of the whole grid.
introbooleantruePops the dots in from the centre when the grid first appears.
mouseInteractionbooleantrueLets the pointer push the dots and light them up.
clickShockbooleantrueSends a shockwave out from each click.
pausedbooleanfalseFreezes the animation.
dprnumberNoneThe highest device pixel ratio drawn; the screen's by default, capped at 2.
classNamestringNone
styleCSSPropertiesNoneInline styles for the container.

More background effects in Pro

View all

Related