axi0motion

Slot text

Each letter spins through a reel of random glyphs and lands on the real one, one after another.

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

Slot text example

Every letter lands in place.

Controls

8
750 ms
35 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="slot-text">Every letter lands in place.</p>

The wrappers: SlotText.tsx (React, TypeScript) and SlotText.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-dirupReel direction
data-motion-times8Glyphs on each reel
data-motion-duration750Spin time per letter
data-motion-stagger35Delay between letters
data-motion-glyphsupperGlyph set
data-motion-color#f6a04dReel glyph color

Accessibility

Screen readers hear the text once; the reels are aria-hidden. Every letter keeps its measured width and the reel is clipped inside it, so the line never moves. Text already on screen at load waits for a hover or a replay; reduced motion shows the plain text. The reels pause off screen and in hidden tabs.

Size

slot-text.js is 1.5 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.