axi0motion

Wire text

The letter under the pointer turns into a dashed vector outline with handles and its size, like a selection in a drawing app; the letters it leaves stay outlined a moment.

  • enhancer
  • pointer
  • svg
  • letters
  • 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

Wire text example

Vector type

Controls

1 em
900 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-num" data-motion="wire-text">Vector type</p>

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

Options

AttributeDefaultWhat it does
data-motion-color#f6a04dSelection color
data-motion-reach1Reach around the letters
data-motion-trail900How long a left letter stays outlined
data-motion-labeltrueShow the letter's size
data-motion-idletrueStep through the letters when nobody points

Accessibility

The text reads once for screen readers (the letter pieces are aria-hidden) and the outline, frame and size label are an aria-hidden layer over the letters, so nothing reflows. Reduced motion keeps the selection but drops the marching dashes, the gliding frame and the idle stepping. The idle loop stops off screen and in hidden tabs.

Size

wire-text.js is 2.2 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.