# Infinite Perspective Grid

> A true 3D floor of glowing lines that recedes forever to a lit horizon, with an optional ceiling for a tunnel.

Category: Backgrounds · MotionKit Plus · Updated 2026-10-21 · Live demo: https://www.motionkitui.com/components/perspective-grid

## When to use it

Synthwave, gaming and futuristic tech heroes, and tunnel-style intros with the ceiling turned on.

## How it works

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.

## Installation

Part of MotionKit Plus (https://www.motionkitui.com/pricing). Subscribers install it with `npx shadcn@latest add @motionkit/perspective-grid` after adding their registry token from https://www.motionkitui.com/account.

## Props

| 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. |

## Accessibility

- **Keyboard: Not applicable.** Decorative, nothing to focus.
- **Screen readers: Pass.** The canvas and glow are hidden from assistive tech.
- **Reduced motion: Pass.** With reduced motion on, it draws one still frame. It also stops drawing while off screen.
- **Colour contrast: Partial.** Lines are faint near your content, but the horizon glow is bright: keep text above or below it.
