Hero Templates

Grid Horizon

A synthwave horizon in one fragment shader. A glowing grid floor, a banded sun, parallax ridges and a pulse rolling out of the vanishing point.

Install

bun add ogl

Then copy 2 files into your project:

  • components/registry/grid-horizon/grid-horizon.tsx
  • hooks/use-animation-loop.ts

Props

PropTypeDefaultDescription
lineColorstring (hex)"#a855f7"Grid line color.
sunColorstring (hex)"#f0abfc"Sun disc color.
hazeColorstring (hex)"#2e1065"Horizon haze band.
backgroundColorstring (hex)"#070312"Sky gradient base.
scrollSpeednumber0.35How fast the floor streams underfoot.
gridDensitynumber1Grid spacing multiplier.
sunSizenumber0.22Sun disc angular radius.
horizonGlownumber1Haze and ridge-rim strength.
enableMouseInteractionbooleantrueLet the cursor steer the vanishing point.

What It Demonstrates

Loop
An animation that repeats, a set number of times or infinitely.
Parallax
Background and foreground move at different speeds while scrolling, creating depth.
Pulse
A gentle repeating scale or opacity change to draw attention.
Hover effect
Visual change when the cursor moves over an element.

Related Components

Appears In