Pixel tiles
Playground
Colour
Pointer
Install
npm install @shavin/fximport { PixelTiles } from "@shavin/fx";Works with
React
Client component; Next.js and any React 18+ app
Remotion
Frame-exact through FxTimeProvider or time
Usage
Component Source
import { PixelTiles } from "@shavin/fx";
<PixelTiles />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| colors | FxPalette: "theme" | "native" | "brand-dark" | "brand-light" | string[] | { light: string[]; dark: string[] } | "theme" | Palette. "theme" follows the brand and light/dark; "native" is monochrome slate ink; "brand-dark" / "brand-light" force one side; an array is a custom [waveColor, bgColor] pair. |
| color | "theme" | "monochrome" | "brand-dark" | "brand-light" | string[] | — | Deprecated: use colors ("monochrome" is colors="native"). |
| cell | number | 14 | Grid cell size in CSS px. |
| speed | number | 0.25 | How fast the wave flows. |
| frequency | number | 1.6 | Spatial frequency of the wave. |
| amplitude | number | 0.5 | How far the wave distorts. |
| intensity | number | 1 | Contrast and colour intensity multiplier. |
| interactive | boolean | true | The pointer pushes the wave aside (mouse, touch and pen). Ignored under reduced motion. |
| mouseRadius | number | 0.3 | Radius of the pointer's influence, relative to the canvas height. |
| time | number | — | Controlled time in seconds (e.g. frame / fps in Remotion); also read from FxTimeProvider. |