axi0motion

Jelly dots

A springy dot grid the pointer drags through like jelly, with click shockwaves.

  • enhancer
  • pointer
  • background
  • grid
  • physics
  • click
  • 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

Jelly dots example

Drag the pointer through the dots, or click

Controls

26 px
2 px
120 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>

<div class="m-jelly-dots" data-motion="jelly-dots"><p>Drag the pointer through the dots, or click</p></div>

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

Options

AttributeDefaultWhat it does
data-motion-gap26pixels between dots
data-motion-size2dot radius in pixels
data-motion-active#f6a04dthe dots near the pointer and the moving ones
data-motion-reach120the pointer's reach in pixels
data-motion-shocktruea click sends a shockwave

Accessibility

One canvas behind the content, with frames only while dots move; it stops when they settle, off screen and in hidden tabs. The colors follow the page's light or dark theme. Touch: a tap sends the shockwave and a drag moves the dots until the page scrolls. Reduced motion: the dots stay still and only light up near the pointer. Decorative: hidden from screen readers.

Size

jelly-dots.js is 2.4 KB gzip. A page loads the loader (2.7 KB) and core.js (1.4 KB) once, whatever it uses.