Skip to main content

JavaScript animation example

JavaScript Hover Effect: Blob Cursor and Link Underlines

A custom cursor is a strong signature for a portfolio or agency site. This one is a soft blob that trails your pointer, stretches in the direction of travel when you move fast, and swells into a ring over links. The links themselves draw their underline from left to right on hover and retract to the right on leave.

  • 4.3 KB file
  • 4 live inputs
  • JavaScript runtime
Live, try it

How this blob cursor links works

  • The blob follows the pointer with a spring; its stretch and angle come from its current velocity.
  • Over a link, the blob grows into a ring and switches to a difference blend so the text stays readable.
  • Underlines draw in from the left and out to the right, which reads as continuous motion.

Add it to your JavaScript app

Install exodeui-vanilla, download the file below, and paste this. The code updates as you customize. Other runtimes are in the other tabs.

import { ExodeUICanvas } from 'exodeui-vanilla';

// <canvas id="javascript-hover-effect" style="width: 100%; height: 480px"></canvas>
const player = new ExodeUICanvas({
  element: '#javascript-hover-effect',
  fit: 'Layout',
  onReady: (engine) => { },
});
player.load(await (await fetch('/javascript-hover-effect.exode')).json());
player.play();

Inputs

InputTypeDefaultRange
linksTextSelected work,Studio,Journal,Say hello—
accentText#ff5a1fhex colour
inkText#f5f5f4hex colour
bgText#121212hex colour

More JavaScript animations

The same idea in other frameworks: React liquid fill button · React spotlight hover grid