axi0motion

Dust type

The text gathers out of drifting dust; the pointer scatters it and a click blows it apart before it settles back.

  • enhancer
  • canvas
  • particles
  • pointer
  • 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

Dust type example

Future interfaces

Controls

18
1.8 px
80 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="dust-type">Future interfaces</p>

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

Options

AttributeDefaultWhat it does
data-motion-density18Dust per letter height
data-motion-size1.8Grain size
data-motion-radius80Reach of the pointer
data-motion-color#f6a04dColor of moving grains

Accessibility

The words stay real, selectable text in their places (painted transparent while the dust shows them) and the canvas is aria-hidden, so nothing reflows and readers hear the text once. Text on screen at load starts gathered; below the fold it gathers as it arrives. Reduced motion shows the plain text. The frame loop stops off screen and in hidden tabs.

Size

dust-type.js is 2.0 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.