axi0motion

Glow trail

Light pours from the pointer, drifts up and cools as it fades.

  • enhancer
  • cursor
  • pointer
  • trail
  • light
  • since 0.2

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

Glow trail example

Move the pointer, or tap

Controls

26 px
1200 ms
1
1

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>

<div class="m-glow-trail" data-motion="glow-trail"><p>Move the pointer, or tap</p></div>

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

Options

AttributeDefaultWhat it does
data-motion-colors#fff4dc,#f6a04d,#ff6b8b,#8a7dffthe cooling ramp, hot to cold
data-motion-size26the glow's radius in pixels
data-motion-life1200milliseconds a glow lives
data-motion-rate1how much light a move pours
data-motion-drift1how fast it rises (0 = floats in place)

Accessibility

The real pointer is never hidden; the light only follows it. One canvas over the box, with frames only while light is in the air. On light pages the light is drawn as soft color instead of added light, and the white stop is dropped. Touch: a tap gives a burst. Reduced motion: no light. Decorative: hidden from screen readers.

Size

glow-trail.js is 2.2 KB gzip. A page loads the loader (2.7 KB) and core.js (1.4 KB) once, whatever it uses.