axi0motion

Decode

Random glyphs cycle under every letter until each one locks into the real text.

  • enhancer
  • entrance
  • hover
  • scramble
  • 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

Decode example

Access granted. Welcome back.

Controls

1100 ms
40 ms

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" data-motion="decode">Access granted. Welcome back.</p>

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

Options

AttributeDefaultWhat it does
data-motion-triggerbothPlays on
data-motion-orderstartLetters lock from
data-motion-duration1100Time until every letter locks
data-motion-speed40Time between glyph changes
data-motion-glyphsmixedGlyph set
data-motion-color#f6a04dGlyph color

Accessibility

Screen readers hear the real text once (an aria-label on headings, links and buttons, a hidden copy elsewhere) and the moving letters are aria-hidden. Each letter keeps its measured width while it shows a glyph, so nothing around it moves. Text already on screen at load waits for a hover or a replay; reduced motion shows the plain text. The frame loop stops off screen and in hidden tabs.

Size

decode.js is 1.1 KB gzip, with text-kit.js 2.6 KB it needs. A page loads the loader (2.7 KB) and core.js (1.4 KB) once, whatever it uses.