How are we supposed to do tooltips now?
How are tooltips and modals supposed to work outside of the framework world? What the Web Platform provides is insufficient:
titleattribute is unstyled and only shows up after hovering for a long time over an element.
So, what to do? There’s:
- The pure CSS option. Seems like balloon.css is the main example. Unmaintained for three years, but maybe that works? Wouldn’t have the right placement for tooltips if they’re on an edge of the screen. Tooltips also can’t contain HTML or styling.
- Or maybe I should use floating-ui and write a little extension. The DOM-only version of floating-ui is tiny, and the library is very high quality and used everywhere - it’s what Radix uses.
I think it’s kind of a bummer that there just aren’t clear options for this kind of thing.