To setup interactivity, add event listeners which call the show and hide methods. First, define arrays of the relevant events above the class definition:

Now add a target property which indicates the element being hinted by the tooltip. Create a property accessor inside the class that manages adding and removing event handlers:

The user can set the tooltip's target imperatively, but to make the element easy to use declaratively in HTML, if a target hasn't been set, default it to the previous DOM element when the tooltip is connected. There are fancier ways to manage the target declaratively, but this should suffice for now. To the end of connectedCallback add:

The nullish assignment operator is used to set the target only if it is unset.

The tooltip is now displayed based on user interactivity, but it's not positioned correctly, as you can see by moving your pointer over the right-most box.