Luca Perullo
Components

Component

LiveNew

Retro Grid

Server component, animazione background-position infinita. Linee chiare/scure separate, gradient overlay verso bg.

BackgroundRetro
Open in ClaudeSorgente

Esempio01

retro-grid.tsx
001Default · synthwave
002Hero · with title
section · 001

Pronto a spedire?

003Steeper · custom angle

Note L'illusione della profondità nasce dalle perspective:200px + rotateX(65deg). Il gradient bottom→bg sfuma la base.

Prompt LLM02

Incolla in Claude o ChatGPT per generare la tua variante. Include il contesto del brand, i token e i vincoli del progetto.

Prompt · retro-grid
Open in Claude
Sei un senior frontend engineer. Stai lavorando su un sito Next.js 16 + React 19 + Tailwind v4 in italiano, look chanhdai-inspired: colonna stretta 672px, Geist Sans + Geist Mono, hairline 1px, divisori a stripe diagonale, palette zinc.

Token CSS disponibili: --bg, --bg-alt, --fg, --fg-muted, --fg-soft, --border, --border-strong, --accent. Usa SEMPRE queste variabili tramite le utility tailwind generate (bg-bg, text-fg-muted, border-border, ecc.). Helper "cn" da "@/lib/utils". Niente librerie UI extra: solo lucide-react e tailwind-merge.

Genera un componente <RetroGrid> synthwave perspective grid.
Props:
- angle?: number (deg, default 65).
- cellSize?: number (px, default 60).
- opacity?: number (default 0.5).
- lightLineColor?: string (default "var(--border-strong)").
- darkLineColor?: string (default "var(--border)").
- className?: string.

Implementazione:
- Server component. Wrapper absolute inset-0 [perspective:200px]. Inner [transform-style:preserve-3d] [transform:rotateX(var(--retro-angle))].
- Inset -y-[100%] con background-image linear-gradient orizzontale + verticale, backgroundSize var(--retro-cell), animation retro-grid-scroll 20s linear infinite.
- Gradient bottom: 0 → bg per fade.

Output: file completo src/components/retro-grid.tsx.

Uso tipico03

tsx
<RetroGrid angle={65} cellSize={60} />

Dipendenze04

npm
  • tailwind-merge
  • clsx
Interno
  • @/lib/utils#cn

Ti è servito? Dimmelo, oppure proponi il prossimo componente.