DEV Community

Discussion on: Build your own React Tooltip Component

yoursunny profile image
Junxiao Shi

It's a lot easier to use the HTML title attribute:

<button title="view details">details</button>
Enter fullscreen mode Exit fullscreen mode
alexandprivate profile image
Alex Suarez Author

Hi there, LOL, easier? Sure. Better? Absolutely not, you can style title, not ui or behavior, also title has a default delay to show up, we acn say title is the most primitive way of tooltip natively support by the browser, so if you can improve that do it 👍