Skip to content
WANCRAFT

E.19Backgrounds & Effects

Noise Grid

An editorial hairline grid with film grain and accent cells that pulse and wander.

ReactCSSSVGTailwindintermediate

Overview

Noise Grid layers a hairline grid (with a stronger major line every four cells), a film-grain texture rasterised once from SVG feTurbulence, and a few accent cells that pulse and drift to neighbouring cells. Everything is CSS: the grid is a background image, the grain a tiled data URI, and the highlights a handful of elements animated on opacity and transform through the Web Animations API — paused offscreen and in hidden tabs.

01Installation

Method 01 · Registry

CLI verified

Uses the shadcn CLI in a project initialised with shadcn init. Installs the file to components/ui/noise-grid.tsx and adds its dependencies.

npx shadcn@latest add https://wancraft.my/r/noise-grid.json

Method 02 · Copy and paste

  1. 1. No extra dependencies — React and Tailwind CSS only.
  2. 2. Copy the source from the Code tab into components/ui/noise-grid.tsx.
  3. 3. Import it and adjust props.
Dependencies
None
Peer
react ≥ 18, tailwindcss ≥ 4
Added
1 Oct 2026
Updated
—

02Usage

The default configuration. Change properties above to generate a tailored example in the Usage tab.

example.tsx
import { NoiseGrid } from "@/components/ui/noise-grid";

export function NoiseGridExample() {
  return (
    <div className="relative h-80 w-full overflow-hidden rounded-xl">
      <NoiseGrid />
    </div>
  );
}

03Props

PropTypeDefaultDescription
spacingnumber48Grid cell size in px.
grainnumber0.35Film-grain strength (0–1). 0 removes the layer.
accentIntensitynumber0.6Fill and outline strength of highlighted cells (0–1).
highlightsnumber5Number of drifting highlighted cells (0–24).
durationnumber4200Length of one highlight pulse in ms.
accentstring"#FF7448"Accent colour for highlights.
fadebooleantrueRadially fades the grid toward the edges.
childrenReactNode—Optional content layered above the grid.
...propsHTMLAttributes<HTMLDivElement>—Forwarded to the root, which is absolute inset-0 — place it inside a positioned parent.

04Features

  • 01Grid drawn with CSS gradients — zero DOM per cell
  • 02Grain is a once-rasterised SVG feTurbulence tile, tuned separately for light and dark
  • 03Highlights pulse then drift to a neighbouring cell (opacity + transform only)
  • 04Animations pause offscreen and in hidden tabs; cells stay in bounds on resize
motion · continuousmotion · tweeninput · viewport

05Accessibility

  • All decorative layers are aria-hidden and ignore pointer events.
  • prefers-reduced-motion shows the highlighted cells at rest, without pulsing or drifting.