OfferLifetime Pro for $99

Grid & Dot Background

Pure CSS, in the theme's border colour by default, with a radial, bottom or edge fade so it never runs hard into the section's edge. It can drift one cell every few seconds.

CreativeFree109 lines · one file

The decision inside it

The fade is part of the component

A grid that stops at a hard edge looks like a mistake, so every pattern comes with a fade and you pick where it falls.

When to use it

Use Grid & Dot Background behind a hero or feature section for quiet texture: lines, dots or crosses that fade out at the edges. For colour and movement, use Aurora Background.

Installation

How you get it

Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.

Use Layro's Grid & Dot Background for this.
Install it: npx shadcn@latest add @layro/grid-background
(the @layro registry is set up in components.json, with LAYRO_KEY in .env.local)
Import it from @/components/ui/grid-background.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.

For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Free components install through the @layro registry with your CLI token: see the Namespaced tab.

Usage

components/hero-section.tsx
import { GridBackground } from "@/components/ui/grid-background";

export function HeroSection() {
  return (
    <GridBackground pattern="dots" fade="radial" className="rounded-3xl py-24 text-center">
      <h1 className="text-4xl font-semibold">Contracts signed before the meeting ends.</h1>
    </GridBackground>
  );
}

API reference

“Copy prompt” above puts a full brief on your clipboard — install command, dependencies, props, and the mistakes an assistant usually makes with this component.

Props

Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.

PropTypeNotes
pattern"grid" | "dots" | "cross"Lines, dots or small crosses. Default "grid".
sizenumberOne cell, in pixels. Default 32.
fade"none" | "radial" | "bottom" | "edges"Where it fades out. Default "radial".
driftbooleanSlow movement, one cell every 6 seconds. Default false.
colorstringThe pattern's colour. Default the theme's border colour.
childrenReact.ReactNode—

Dependencies

npm packages

clsxtailwind-merge

Layro foundations, installed alongside it

layro-theme

States

All of them are drawn by the component. None is left for you to design.

  • Grid
  • Dots
  • Crosses
  • Drifting
  • Reduced motion

Accessibility

  • Keyboard reachable throughout, in visual order
  • Focus trapped in overlays, Escape closes them
  • Focus returns to whatever opened it
  • Live regions announce what changed, not that something did
  • Honours prefers-reduced-motion

Responsive behavior

  • Sizes to its container, not the viewport
  • Usable from 320px up
  • Pointer-based interaction, so trackpad and touch both work
  • No hover-only affordances

Lifetime access

Every component, and everything we ship next.

  • All 232 components, source included
  • Every template, and everything released after you buy
  • shadcn CLI or download — React 18/19, Tailwind v4
  • One payment. No subscription.