axi0motion

Shiny text

A band of light sweeps across the text, again and again.

  • enhancer
  • shine
  • loop
  • highlight
  • 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

Shiny text example

A light passes over the words.

Controls

3 s

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>

<p class="demo-big"><span data-motion="shiny">A light passes over the words.</span></p>

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

Options

AttributeDefaultWhat it does
data-motion-speed3seconds per pass
data-motion-colorautothe band's color; auto mixes a light shade of the text color

Accessibility

Pure CSS once started; paused off screen and in hidden tabs. Reduced motion: plain text. The text keeps its color for contrast checks and theme changes.

Size

shiny.js is 0.4 KB gzip. A page loads the loader (2.7 KB) and core.js (1.4 KB) once, whatever it uses.