Retro Grid
A nostalgic retro-style grid background with 3D perspective. Creates an animated grid that scrolls infinitely, perfect for 80s/90s inspired designs.Installation
CSS Variables
Add the following to your global CSS file:src/routes/+layout.css
Usage
Props
The rotation angle of the grid in degrees. Controls the 3D perspective tilt.
The size of each grid cell in pixels.
The opacity of the grid (0-1).
The color of grid lines in light mode. Accepts any valid CSS color.
The color of grid lines in dark mode. Accepts any valid CSS color.
Additional CSS classes to apply to the container element.
Examples
Basic Retro Grid
Custom Angle
Larger Grid Cells
Custom Colors
Purple Cyberpunk Style
Dense Grid
Notes
- Uses CSS 3D transforms for the perspective effect
- Grid animates infinitely with vertical scrolling
- Automatically adapts to light and dark themes
- Has a gradient fade at the bottom for seamless integration
- The animation creates a continuous loop for smooth motion
- Perspective is fixed at 200px for the retro look