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| Name | Type | Default | Description |
|---|---|---|---|
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. |
cellSize | number | 40 | The size of each cell, in pixels. |
lineWidth | number | 1 | The thickness of the grid lines, in pixels. |
direction | "diagonal" | "up" | "down" | "left" | "right" | "none" | "diagonal" | Which way the grid drifts. `none` holds it still. |
speed | number | 0.5 | How fast the grid drifts. |
lineColor | string | "#2a2734" | The colour of the grid lines; any CSS colour. |
hoverColor | string | "#ffffff" | The colour cell borders light up in under the pointer. |
hoverFillColor | string | "" | The colour that fills lit cells. Follows `hoverColor` when empty. |
fillOpacity | number | 0.15 | How solid the inside of a lit cell gets, 0 for outlines only to 1. |
rainbow | boolean | false | Lights cells in shifting rainbow colours instead of the hover colour. |
tiltX | number | 0 | Tilts the grid back in perspective, in degrees. Positive pushes the top away. |
tiltY | number | 0 | Turns the grid sideways in perspective, in degrees. Positive pushes the right side away. |
radius | number | 1.5 | The size of the light around the pointer, in cells. 0 lights only the cell under it. |
trail | number | 0.6 | How long lit cells take to fade after the pointer moves on, in seconds. |
glow | number | 0.35 | The soft glow around lit cells, 0 to 1. |
twinkle | number | 0 | Lets random cells light up on their own now and then, 0 to 1. |
fade | number | 1 | Fades the grid out toward the edges, 0 to 1. |
clickCascade | boolean | true | A click sends a ring of lit cells rolling out across the grid. |
intro | boolean | true | Draws the grid in from the middle when it first appears. |
opacity | number | 1 | The opacity of the whole grid. |
backgroundColor | string | "transparent" | The colour behind the grid. |
paused | boolean | false | Freezes the drift and the lights. |
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. |