A hairline grid with short pulses of light travelling along its lines, like data moving through a network, brightening around the cursor.
A true 3D floor of glowing lines that recedes forever to a lit horizon, with an optional ceiling for a tunnel.
Customize
Usage
import { PerspectiveGrid } from "@/components/motionkit/perspective-grid";
<PerspectiveGrid
className="h-[32rem] rounded-3xl pt-24 text-center"
>
<h1>Your hero</h1>
</PerspectiveGrid>Motion
The exact curves this component runs, plotted with Motion's own maths.
One square closer
Runs on its own
Synthwave, gaming and futuristic tech heroes, and tunnel-style intros with the ceiling turned on.
A canvas draws a true 3D floor. With a camera one unit above an endless plane, a point z units away lands focal / z pixels below the horizon, so lines bunch up as they recede, as real ones do. Depth lines move towards you at a steady number of squares per second, side lines all aim at one vanishing point, and drawing stops while the canvas is off screen.
| Prop | Type | Default | Description |
|---|---|---|---|
| color | string | "#5FAEB4" | Line and glow colour as a hex value. |
| spacing | number | 48 | Size of the nearest squares in pixels. |
| speed | number | 1 | Squares per second toward the viewer. 0 holds still. |
| intensity | number | 0.7 | Strength of the lines and horizon glow, 0 to 1. |
| horizon | number | 0.5 | Horizon height, 0 (top) to 1 (bottom). |
| mirror | boolean | false | Add a ceiling, for a tunnel. |
| children | ReactNode | — | Your content, layered above. |
How we audit: the WCAG 2.2 animation checklist and respecting reduced motion in React.
Yes. The file starts with "use client", so you can import it straight into a Server Component page or layout. It works in Vite as is, and in Astro as a React island.
Nothing beyond React and Tailwind CSS v4. There is no MotionKit package and no Tailwind config to add.
Yes, with MotionKit Plus. Add the @motionkit registry and your personal token to components.json (the snippet is on your account page), then run npx shadcn@latest add @motionkit/perspective-grid. It saves the file to components/motionkit and installs its dependencies.
Infinite Perspective Grid is part of MotionKit Plus (£12 / $15 / €14 a month or £96 / $120 / €112 a year). The live preview and playground are free to explore; Plus unlocks its source code, every customisation control and commercial use.
With reduced motion on, it draws one still frame. It also stops drawing while off screen.
A hairline grid with short pulses of light travelling along its lines, like data moving through a network, brightening around the cursor.
An even grid of dots that swell to form shapes or words, hold, then ripple outward from the centre into the next one.
A retro perspective grid rolling toward a glowing horizon, synthwave style.
To infinity
The live preview is free to explore. Plus unlocks the source for Infinite Perspective Grid and every other premium component.
Not ready for Plus? A free account unlocks 4 premium components, Depth Card, Rolling Text, Dot Wave and Confetti Button, with no card needed.
Customize
Usage
import { PerspectiveGrid } from "@/components/motionkit/perspective-grid";
<PerspectiveGrid
className="h-[32rem] rounded-3xl pt-24 text-center"
>
<h1>Your hero</h1>
</PerspectiveGrid>Motion
The exact curves this component runs, plotted with Motion's own maths.
One square closer
Runs on its own
To infinity