axi0motion

Ring text

The letters sit around a circle that turns slowly; hovering speeds it up, slows it, pauses it or sends it spinning.

  • enhancer
  • loop
  • hover
  • circle
  • 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

Ring text example

MOTION • TEXT • RING •

Controls

18 s
0 px

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="ring-text">MOTION • TEXT • RING •</p>

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

Options

AttributeDefaultWhat it does
data-motion-spin18Time per turn
data-motion-hoverfastOn hover
data-motion-directioncwDirection
data-motion-size0Ring size (0 fits the text)

Accessibility

The element keeps the box of its line (the text stays in place, invisible) and the ring is drawn centered on it, so nothing reflows; leave room around it, or set a size. Screen readers hear the text once; the ring is aria-hidden. Reduced motion shows a still ring. The loop stops off screen and in hidden tabs.

Size

ring-text.js is 1.4 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.