atomiks / tippyjs

Tooltip, popover, dropdown, and menu library
https://atomiks.github.io/tippyjs/
MIT License
11.78k stars 517 forks source link

Painless use: Just pull content from the title attribute #1157

Closed JohnnyWalkerDigital closed 4 months ago

JohnnyWalkerDigital commented 5 months ago

How nice would it be just for tippyjs to search for a title attribute and automatically do the rest? A zero config solution.

This is far more semantically correct, too.

<a href="user/edit" title="Upload your profile photo">Upload</a>

This is what the title attribute was designed for, but tippyjs could make those semantically correct tooltips look far more interesting and engaging for the user.

https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title

crowjake commented 5 months ago

Seems like it wouldn't be too difficult to set up: https://atomiks.github.io/tippyjs/v6/faq/#can-i-use-the-attribute

JohnnyWalkerDigital commented 5 months ago

Ooh! I missed that. Thank you. That was a very easy implementation