With Claude Fable 5 making software creation more accessible, interaction design is becoming an even…
Gabriel
Visit on X@gabriell_lab13K followers
41,136 views
With Claude Fable 5 making software creation more accessible, interaction design is becoming an even bigger differentiator. So here is a Design Engineering Tip:
Most interfaces wait for users to act. Better interfaces prepare for what users are about to do.
This pattern is called Input Anticipation. By reacting to intent before an interaction happens, products feel faster, smarter, and easier to use.
JS
const box = document.querySelector(".input")
const ring = document.querySelector(".focus-ring")
addEventListener("pointermove", (e) => {
const r = box.getBoundingClientRect()
const dx = Math.max(r.left - e.clientX, 0, e.clientX - r.right)
const dy = Math.max(r. top - e.clientY, 0, e.clientY - r.bottom)
const distance = Math.hypot(dx, dy)
const intent = Math.max(0, 1 - distance / 180) ** 2
ring. style.opacity = intent
})
Save this for later.
Comments
Comments from the original post on X (Twitter)
No comments yet
