axi0motion

Gradient text

The text fills with colors that flow slowly along it.

  • enhancer
  • gradient
  • loop
  • color
  • 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

Gradient text example

Color flows through the letters.

Controls

6 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="gradient-text" data-colors="#f6a04d,#ff6b8b,#8a7dff">Color flows through the letters.</span></p>

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

Options

AttributeDefaultWhat it does
data-motion-colors#f6a04d,#ff6b8b,#8a7dfftwo or more colors, comma separated
data-motion-speed6seconds per loop

Accessibility

Pure CSS once started; paused off screen and in hidden tabs. Reduced motion: the gradient stays still.

Size

gradient-text.js is 0.5 KB gzip. A page loads the loader (2.7 KB) and core.js (1.4 KB) once, whatever it uses.