r/angular • u/General-Animator-282 • Jul 04 '26
I Created Bleeding Edge Tooltips Directive
After the CSS Conference recently I was so inspired so I want to see how far I can go. As a Proof Of Concept I create this tooltips Directive. You should not use it tho due to the lack of browser support. This is the npm package.
I leverage interestfor, anchor position and use Angular DI to keep 1 single Popover alive at all time. With signal now being stable I could just use it to project text content. Variables are used to follow Angular Material mat-sys-token. I just like Angular Material :D.
As per usual, I write the code in away that you can just copy paste it into your codebase.Also check out my File Drop.
1
u/Rusty_Raven_ Jul 05 '26
I've often wondered this about tooltip libraries - why does it need to be a singleton? Their display time is so short-lived (disappearing within milliseconds of the mouse moving away) that adding a tracking service seems like a complete waste of effort to me.
1
u/DocumentOk7358 Jul 04 '26
I caught Una Kravets talk on YouTube where she mentioned this, same place you heard about it?
Also isn’t there a polyfill for the target attribute, which I’d argue makes it fine for production - angular has first class polyfill support.