A retro night sky drawn on a crisp pixel grid: stars twinkle in stepped brightness across three depths, near stars flare into pixel crosses, pixel shooting stars streak by every few seconds and a Bayer-dithered gradient, horizon haze and milky way sit behind it all. The layers shift with the pointer for parallax, a tap launches a shooting star, and pixels stay razor sharp at any device pixel ratio.
Included in Standard and aboveCompare plans
Live preview. Move the mouse, scroll and click inside the frame.
import { PixelStarSky } from "@/components/hyperblur-pro/pixel-star-sky"
<PixelStarSky style={{ height: 520 }} pixelSize={3}>
<h1>Night shift</h1>
</PixelStarSky>| Prop | Type | Default | Description |
|---|---|---|---|
| colors | string[] | ["#ffffff", "#b4d2ff", "#ffe2a8", "#ffa8d8"] | Star palette. The first color is used for most stars, the rest are mixed in. |
| background | [string, string] | ["#04050d", "#15123a"] | Top and bottom colors of the dithered sky gradient. |
| glow | string | "#3a1f6e" | Color of the dithered haze along the horizon and the tint of the milky way. |
| pixelSize | number | 3 | Size of one sky pixel in CSS pixels. Snapped to whole device pixels so edges stay crisp. |
| density | number | 1 | Star density from 0.2 to 3. Capped at 1600 stars. |
| speed | number | 1 | Twinkle, drift and shooting star speed. 0 freezes the sky. |
| shootingStars | boolean | true | Send a pixel shooting star across the sky every few seconds and on tap or click. |
| interactive | boolean | true | Shift the star layers with the pointer. Before the first interaction the sky drifts on its own. |
| milkyWay | boolean | true | Draw a faint dithered milky way band across the sky. |
| children | React.ReactNode | - | Content rendered on top of the sky. |
| className | string | "" | Classes for the root element. Give it a size. |
| style | React.CSSProperties | - | Inline styles for the root element. |
Source code is included in Standard and above