AuroraBackground renders three Framer Motion animated gradient layers behind every page, creating the living aurora curtain effect that defines Aurora Cosmos.
Use this file to discover all available pages before exploring further.
AuroraBackground is the visual soul of Aurora Cosmos. It paints a continuously shifting aurora curtain across the entire viewport using three independent Framer Motion gradient layers, each blending in mix-blend-mode: screen over the deep bg-space-900 base. Because it is fixed in place and completely inert to pointer events, every other element in the app floats naturally above it without any z-index juggling.
AuroraBackground is a fixed, full-viewport layer that always sits at z-index 0. The component:
Covers the entire screen with fixed inset-0 overflow-hidden
Sets the base canvas colour to space-900 (#020617)
Applies pointer-events-none so it never intercepts clicks, hovers, or focus from content above it
Renders completely autonomously — it accepts no props and manages its own animation lifecycle internally
The outermost wrapper also holds a subtle radial gradient overlay (from-space-800 via-space-900 to-space-900, opacity 80%) anchored at the top-right corner. This gradient deepens the corners and frames the aurora glow without competing with it.
from-aurora-green via-aurora-teal to-transparent. Anchored to the bottom (bottom-0 left-[10%]), w-[80%] h-[40%]. Blur 90px, opacity 0.20.
Every coloured layer is a motion.div set to mix-blend-screen so the gradients add light rather than cover content — the effect is only visible against a dark background.
Each motion.div uses Framer Motion’s animate prop with a looping transition. All three run on independent timers so the aurora never repeats itself exactly.
Because AuroraBackground is position: fixed and z-index: 0, any page-level element with position: relative (or higher z-index) will automatically render in front of it — no additional CSS is needed.
AuroraBackground uses mix-blend-mode: screen on every gradient layer. This blend mode adds the brightness of the layer to whatever is behind it. It only produces the correct aurora effect against a very dark background. If you change the base colour away from bg-space-900 (#020617) to anything lighter than approximately #111, the gradients will wash out and the aurora effect will be lost.
Change the opacity-* class on each motion.div wrapper to make a layer more or less prominent:
// More visible turquoise layerclassName="... opacity-60 ..." // was opacity-40// Nearly invisible green horizonclassName="... opacity-10 ..." // was opacity-20