Back to all features
Open for signals HTML

Interest invokers

Interest invokers, registered by the interestfor HTML attribute, trigger events and actions on a target element when a user shows interest in the element, through behaviors such as hover, focus, or long-press. Pseudo-elements apply styles to sources and targets of interest.

Modern Web Guidance

How Modern Web Guidance uses this feature

Shows preview popovers and rich hovercards on hover or focus using declarative interestfor and interestaction attributes with built-in dismiss mechanics.

Recommended fallback strategy

For browsers lacking declarative interestfor support, load the @oddbird/interestfor polyfill conditionally or listen for standard focus, blur, pointerenter, and pointerleave events.

Community use cases (1)