MenuClose

Aurora — React Animated Background

Polar-light curtains: fBm-perturbed Gaussian bands drifting across a near-black GPU sky.

View source
PreviewWEBGPU
Starting live preview

Usage

import { Aurora, AURORA_PRESETS } from "@/components/Aurora";

export function NightHero() {
  return (
    <section style={{ position: "relative", minHeight: "100dvh" }}>
      <Aurora {...AURORA_PRESETS.emerald}
        {...{
          interactive: true,
          speed: 0.7,
          intensity: 0.45,
          bands: 3,
          primary: "#2dd4bf",
          secondary: "#818cf8"
        }}
      />
      <div style={{ position: "relative", zIndex: 1, padding: "10rem 2rem" }}>
        <h1>Northern lights, no video file</h1>
      </div>
    </section>
  );
}
Implementation notes & API

Purpose: cinematic night-sky background with up to five animated light curtains; pairs well with white or light-accent typography. Mount: full-bleed fixed or absolute layer; keep content z-index above. Props: primary/secondary hex curtain colors, speed, intensity (brightness), bands (1-5). Pointer: the cursor sways the curtains sideways (x) and lifts them (y); interactive={false} pins them. Guardrails: designed for dark themes — on light themes lower intensity below 0.5; WebGPU required with fallback prop.

PropertyTypeNotes / default
interactivebooleanfalse in the library; enabled in this preview
fallbackReactNodeShown when the renderer is unavailable
className / stylestring / CSSPropertiesApplied to the outer container
View source on GitHubFree for commercial projects · MIT