AI analysis A micro-interaction demo comparing a static hover card with a cursor-velocity-aware hover card side by side.
Two identical upload info cards sit side by side at the center of a white canvas, each labeled underneath in gray to distinguish the approach. The cards use a restrained light-mode style with large rounded corners, a soft shadow, a bold black title, gray body text, an info icon, and a close button. Across the frames, only the right card tilts slightly and stretches horizontally in proportion to cursor speed when the pointer sweeps across, then eases back to its original shape. It is useful as a hover interaction reference for adding a physical feel to tooltip or popover cards.
minimal · light-mode
claude-opus-5-5 · 2026-12-03 07:09 · Confidence 0.75
Original post Design Engineering Tip:
Use cursor velocity, not just cursor position. A fast movement can add more rotation, stretch, or blur for a split second. The interface suddenly feels more physical, because it reacts to motion, not just location.
JS
let x = 0, t = performance. now();
addEventListener("pointermove", e => {
let now = performance. now();
let v = (e.clientX - x) / (now - t);
card. style.transform =
`rotate(${v * 6}deg) scaleX(${1 + Math.abs(v) * .08})`;
x = e.clientX;
t = now;
});
CSS
.card { transition: transform .25s cubic-bezier(.22,1,.36,1); }
707 likes · 23 reposts
x.com/gabriell_lab/status/2062232102515675385