Skip to content
PixiKit

Square Grid

A drifting grid of cells that light up under the pointer, leave a fading trail and send a ring of light out from a click.

pixikit.com/docs/effects/square-grid

Customize

Shape
Cell size40px
Line width1.0px
Direction
Speed0.5
Line color
Hover color
Hover fill color
Fill opacity0.15
Rainbow
Tilt x0deg
Tilt y0deg
Radius1.5
Trail0.6s
Glow0.35
Twinkle0.00
Fade1.00
Click cascade
Intro
Opacity1.00
Background color
Paused

Props

25
NameTypeDefaultDescription
shape"square" | "tile" | "hexagon" | "triangle" | "diamond" | "circle" | "cross" | "dot""square"The shape of the cells. `cross` and `dot` draw markers where grid lines would meet.
cellSizenumber40The size of each cell, in pixels.
lineWidthnumber1The thickness of the grid lines, in pixels.
direction"diagonal" | "up" | "down" | "left" | "right" | "none""diagonal"Which way the grid drifts. `none` holds it still.
speednumber0.5How fast the grid drifts.
lineColorstring"#2a2734"The colour of the grid lines; any CSS colour.
hoverColorstring"#ffffff"The colour cell borders light up in under the pointer.
hoverFillColorstring""The colour that fills lit cells. Follows `hoverColor` when empty.
fillOpacitynumber0.15How solid the inside of a lit cell gets, 0 for outlines only to 1.
rainbowbooleanfalseLights cells in shifting rainbow colours instead of the hover colour.
tiltXnumber0Tilts the grid back in perspective, in degrees. Positive pushes the top away.
tiltYnumber0Turns the grid sideways in perspective, in degrees. Positive pushes the right side away.
radiusnumber1.5The size of the light around the pointer, in cells. 0 lights only the cell under it.
trailnumber0.6How long lit cells take to fade after the pointer moves on, in seconds.
glownumber0.35The soft glow around lit cells, 0 to 1.
twinklenumber0Lets random cells light up on their own now and then, 0 to 1.
fadenumber1Fades the grid out toward the edges, 0 to 1.
clickCascadebooleantrueA click sends a ring of lit cells rolling out across the grid.
introbooleantrueDraws the grid in from the middle when it first appears.
opacitynumber1The opacity of the whole grid.
backgroundColorstring"transparent"The colour behind the grid.
pausedbooleanfalseFreezes the drift and the lights.
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