DEV Community

Discussion on: Tooltip using only CSS

Collapse
 
thetwopct profile image
James Hunt

It’s possible to use CSS and sometimes they might suffice. But the reason why many JS libraries exist for tooltips is to detect when a tip goes off-screen, so before integrating in to a project make sure the length of tool tips is not too long and they never need to be at the edge of screens (mobile etc). Just leaving this as a note before someone integrates the above and wastes their time. Sure the JS adds some overhead but JS/webpack etc can handle loading it only where needed.

Collapse
 
thoughtlessmind profile image
Rajiv

yp.. I totally agree with you. Using this method gonna suck after some time. I've made this just to showcase what CSS is capable of.