Declarative Popovers: Meet the New Interest Invoker API

Gowrishankar.Gowrishankar.
2 min read

Imagine crafting beautiful, interactive tooltips and hover cards all without a single line of JavaScript. Yeah you heard it right. That’s the promise of the new experimental Interest Invoker API, now available as an origin trial.

What is it?

The Interest Invoker API is a declarative way to trigger popovers when a user shows interest in an element like hovering or focusing for a brief moment. Think of it as a modern, more stylable alternative to the old, rigid [title] attribute.

You can now use attributes like:

<button interesttarget="info-popover">...</button>
<div id="info-popover" popover>...</div>

This small change allows the popover to show automatically when the button is hovered or focused, without needing JavaScript.

Why It’s Cool

  • No JavaScript: All behavior is handled declaratively through HTML and CSS.

  • Stylable: Say goodbye to default browser tooltips. You have full control with CSS.

  • Responsive & Contextual: Pair it with the Popover API and Anchor Positioning API to create dynamic UI like:

    • Tooltips

    • Hover cards

    • Interactive hints

    • Onboarding callouts


A Glimpse at the Explainer

According to Open UI’s explainer, the goal of Interest Invokers is to:

  • Provide consistent, declarative UX patterns for showing additional content based on light user engagement.

  • Enable low-friction experiences like hover-to-view popovers while respecting accessibility and focus behavior.

  • Align with platform-native solutions (e.g., the title attribute) but give developers control and flexibility.

It’s designed to standardize what devs have long tried to hack together with JS like popovers that appear after hover, but not immediately, or dismiss when the user moves away.


The Future Is Declarative

The Interest Invoker API is part of a larger shift in web UI development empowering developers to build responsive, accessible interactions natively in HTML and CSS.

The evolution of the web is moving toward clarity, control, and composability, and the Interest Invoker API is a strong step in that direction. By reducing reliance on JavaScript for common interactions, we’re not just simplifying code, we’re making interactions faster, more predictable, and easier to reason about.

With native tools like the Popover API and Interest Invokers, we can finally craft experiences that feel intentional and effortless. And at the end of the day it's about building interfaces that just make sense.

4
Subscribe to my newsletter

Read articles from Gowrishankar. directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Gowrishankar.
Gowrishankar.