Glin UI
Signature / Molecule

Retro Grid

CSS perspective grid with scrolling lines for retro-futuristic backgrounds.

Oct 21, online

Launch Week: five days, five releases

Join the live walkthroughs, ask the engineers questions and get early access to everything we announce.

Works with

  • Vercel
  • GitHub
  • Cloudflare
  • Astro

Installation$

Install from
pnpm dlx @glinui/cli@latest add retro-grid

Prefer the package?

Usage$

Place inside a relative container with overflow-hidden. The grid uses CSS perspective with repeating-linear-gradient to create a vanishing-point tile effect.

Examples$

Variants$

Default
Steep angle
Wide cells
import { RetroGrid } from "@glinui/ui"
export function Variants() {
return (
<div data-glin-theme="dark" className="grid w-full gap-3 sm:grid-cols-3">
<div className="relative isolate flex h-44 items-end overflow-hidden rounded-xl bg-[var(--surface-0)] p-3">
<RetroGrid />
<span className="relative z-10 rounded-full bg-black/70 px-2.5 py-1 text-xs font-medium text-white">Default</span>
</div>
<div className="relative isolate flex h-44 items-end overflow-hidden rounded-xl bg-[var(--surface-0)] p-3">
<RetroGrid angle={75} cellSize={40} />
<span className="relative z-10 rounded-full bg-black/70 px-2.5 py-1 text-xs font-medium text-white">Steep angle</span>
</div>
<div className="relative isolate flex h-44 items-end overflow-hidden rounded-xl bg-[var(--surface-0)] p-3">
<RetroGrid cellSize={90} lineOpacity={0.5} />
<span className="relative z-10 rounded-full bg-black/70 px-2.5 py-1 text-xs font-medium text-white">Wide cells</span>
</div>
</div>
)
}

Behind a sign in card$

Sign in to Northwind

Use your work email to continue.

import { RetroGrid, Button, Heading, Input, Label, Text } from "@glinui/ui"
export function SignIn() {
return (
<section data-glin-theme="dark" className="relative isolate flex min-h-[26rem] w-full items-center justify-center overflow-hidden rounded-xl bg-[var(--surface-0)] px-4 py-10">
<RetroGrid />
<form className="relative z-10 flex w-full max-w-sm flex-col gap-4 rounded-2xl border border-[var(--line-soft)] bg-[var(--surface-1)] p-6 text-left [box-shadow:var(--shadow-lg)]">
<div className="flex flex-col gap-1">
<Heading level={2} size="sm">Sign in to Northwind</Heading>
<Text size="sm" variant="muted">Use your work email to continue.</Text>
</div>
<div className="flex flex-col gap-1.5">
<Label htmlFor="email">Work email</Label>
<Input id="email" type="email" autoComplete="email" placeholder="you@company.com" />
</div>
<div className="flex flex-col gap-1.5">
<Label htmlFor="password">Password</Label>
<Input id="password" type="password" autoComplete="current-password" placeholder="At least 12 characters" />
</div>
<Button type="submit" className="w-full">Continue</Button>
</form>
</section>
)
}

Accessibility$

  • The grid element is marked aria-hidden="true", invisible to assistive technologies.
  • Purely decorative; carries no semantic meaning.

Reduced Motion$

The perspective scroll animation is paused via motion-reduce:animate-none and motion-reduce:[animation-play-state:paused]. The static grid remains visible so the layout is unaffected.

API Reference$

PropTypeRequiredDefaultDescription
anglenumberNo65Perspective angle in degrees
cellSizenumberNo60Grid cell size in px
lineColorstringNo-Grid line color
lineOpacitynumberNo0.3Grid line opacity (0-1)

Source$

import { RetroGrid } from "@glinui/ui"
packages/ui/src/components/retro-grid.tsx

Generated API Snapshot

Beta

Auto-extracted from TypeScript source in packages/ui/src/components/retro-grid.tsx. This section is in beta and may lag behind hand-curated docs. Regenerate with pnpm --filter @glinui/docs api:generate.

Generated: 2026-10-08T01:41:21.546Z · Full index: /docs/api-metadata

Primary Props Type

RetroGridProps

RetroGridProps

PropTypeRequiredDefaultDescription
anglenumberNo65Perspective angle in degrees
cellSizenumberNo60Grid cell size in px
lineColorstringNo-Grid line color
lineOpacitynumberNo0.3Grid line opacity (0-1)