You just created a nicely polished, easy to use, high performance tooltip element. Great job, you're a tooltip expert!
- Add additional ways to specify the tooltip target. Hint: try an
id
reference. - Add options for where to position the tooltip relative to the target. Hint: check out the floating-ui docs.
- Hide the tooltip when the page scrolls. Hint: add a "leave" event listener for
scroll
on the document. - Remove the tooltip from the DOM completely when it's hidden, and add it again when shown.