Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/aurora-drift/llms.txt
Use this file to discover all available pages before exploring further.
AuroraBackground is the visual centrepiece of the Aurora Drift template. It paints a full-screen, fixed-position layer of animated aurora light beneath all page content: three slowly morphing SVG paths filled with teal, magenta, and mint gradients float in an infinite loop while subtly tracking mouse movement through spring-physics parallax. A faint base64-encoded starfield adds depth, and a radial vignette fades the edges into the deep navy background colour (#050814). Because it uses pointer-events-none throughout and sits at z-index: -1, it is completely transparent to user interaction.
Usage
RenderAuroraBackground once at the root of your application, outside any scroll container, so it stays fixed as the user navigates between pages.
AuroraBackground sets pointer-events-none on every element it renders. It will never intercept clicks, hovers, or keyboard events no matter where it appears in the tree.Props
AuroraBackground accepts no props. All colours, durations, and spring values are baked into the component. To customise them, edit the source directly.
How it works
Fixed container
The outermost element is a
div with classes fixed inset-0 z-[-1] overflow-hidden bg-navy pointer-events-none. This tiles the navy base colour edge-to-edge and places the whole layer behind the page stack.Starfield texture
An
absolute inset-0 div renders a base64-encoded SVG (three white circles of radius 1 on a 400 × 400 grid) as a CSS background-image. It is shown at 30 % opacity with mix-blend-screen, creating a subtle shimmer against the navy background.Mouse-parallax wrapper
A Framer Motion
motion.div sized at w-full h-[150vh] -top-[25vh] receives two useSpring values — one for x, one for y. On each mousemove event the raw offset is computed as (clientX / window.innerWidth - 0.5) * 20, giving a ±10 px travel range. The spring smooths that into a gentle parallax drift.Animated SVG paths
Inside the motion wrapper, a full-width SVG with
viewBox="0 0 1200 800" and blur-3xl mix-blend-screen opacity-60 hosts three motion.path elements. Each path morphs its d attribute between two keyframe shapes in an infinite easeInOut loop.Animation reference
| Path | Gradient ID | Colours (0 % → 50 % → 100 %) | Duration | Delay | Blend mode |
|---|---|---|---|---|---|
| aurora1 | aurora1 | #2dd4bf → #06b6d4 → transparent | 20 s | 0 s | (SVG default) |
| aurora2 | aurora2 | #c084fc → #14b8a6 → transparent | 25 s | 2 s | mix-blend-overlay |
| aurora3 | aurora3 | #a7f3d0 → #2dd4bf → transparent | 30 s | 5 s | mix-blend-color-dodge |
stopOpacity: 0 so they dissolve cleanly into the navy base.
Spring config (parallax)
TheuseSpring calls that drive the parallax wrapper use these parameters:
| Parameter | Value |
|---|---|
damping | 50 |
stiffness | 400 |
Customisation
Changing aurora colours
Changing aurora colours
Each gradient is defined inside the SVG
<defs> block. Edit the stopColor values on the three linearGradient elements — aurora1, aurora2, aurora3 — to shift the palette. Keep stopOpacity: 0 on the final stop so paths still fade into the background.Adjusting animation speed
Adjusting animation speed
Find the three variant objects (
c, m, x in the minified source). Each has a transition.duration key. Increase the values for a slower, more meditative drift; decrease for a livelier effect.Disabling the starfield
Disabling the starfield
Remove (or comment out) the
div with the bg-[url('data:image/svg+xml;base64,...')] class to eliminate the starfield layer entirely.