axi0motion

Aurora

Soft curtains of colored light drift across a background.

  • element
  • webgl
  • gradient
  • ambient
  • hero
  • since 0.1

Background Studio: tune it below, then copy the code

Your system asks for reduced motion: the demo shows its final state and nothing moves.

Live demo

Aurora example

Controls

1
1
0.85

Code

It follows the controls above: change an option and the code changes with it.

<link rel="stylesheet" href="/axi0/motion/motion.css?v=6">
<script src="/axi0/motion/motion.js?v=10" defer></script>

<axi0-aurora cover colors="#f6a04d,#ff6b8b,#8a7dff"></axi0-aurora>

The wrappers: Aurora.tsx (React, TypeScript) and Aurora.vue (Vue). Both render the same attributes as the HTML; the loader does the rest.

Options

AttributeDefaultWhat it does
colors#f6a04d,#ff6b8b,#8a7dffthree colors, left to right
speed1how fast it drifts
amplitude1how far the curtain folds up and down
glow0.85brightness (0 to 1)
coverfalsefill the nearest positioned parent, behind its content

Accessibility

Drawn by the shared WebGL runner at a reduced resolution; the frame loop stops off screen and in hidden tabs; reduced motion draws one still frame. Without WebGL it shows nothing and the page's own background stays.

Size

aurora.js is 0.7 KB gzip, with gl.js 2.1 KB it needs. A page loads the loader (2.7 KB) and core.js (1.4 KB) once, whatever it uses.