Vuetify: [Feature Request] Change v-tooltip from component to directive

Created on 8 Jan 2018  路  5Comments  路  Source: vuetifyjs/vuetify

New Functionality

We would be able to add a tooltip on every elements (html or vuetify) easily.
Just like this :

<div v-tooltip.top="This is a tooltip on top"></div>
<v-icon v-tooltip.right="This is a left tooltip for a person icon">person</v-icon>

Improvements

It should work everywhere. Currently there is some components like navigation drawer where tooltip do not work.

Bugs or Edge Cases it Helps Avoid

...

wontfix

Most helpful comment

Guys, current tooltips make no sense from the design logic perspective. Even though a tooltip is just a small helper related to a component, you now have to wrap the component in a tooltip as if tooltip was the important, parent element, and not the other way round.

What we do? We add a tooltip to an existing component. It should be as easy as adding a directive tooltip='ABC'. Yes, let us have a separate component for cases that are more complicated, but 99% of time we need a simple solution, not the currently implemented hell of tags.

I think that these are the exact decisions that, when coupled together, can sink an otherwise decent project. Please reconsider, ease of use is a key.

All 5 comments

Tooltips were directives in the older versions of Vuetify, now it's a component and it allowes having html or other components displayed in the tooltip, see the docs https://vuetifyjs.com/components/tooltips
If you think it doesn't work somewhere then create a bug report and provide reproduction link

The current tooltips work, but are super complicated to use (I'm not sure what the "on" variable is or why it needs to be referenced within my component, for instance). A simple directive-based alternative like in this ticket would be so much simpler for common cases. Why not allow both?
Right now I'm using an external v-tooltip lib because of ease of use.

Guys, current tooltips make no sense from the design logic perspective. Even though a tooltip is just a small helper related to a component, you now have to wrap the component in a tooltip as if tooltip was the important, parent element, and not the other way round.

What we do? We add a tooltip to an existing component. It should be as easy as adding a directive tooltip='ABC'. Yes, let us have a separate component for cases that are more complicated, but 99% of time we need a simple solution, not the currently implemented hell of tags.

I think that these are the exact decisions that, when coupled together, can sink an otherwise decent project. Please reconsider, ease of use is a key.

We are taking another look at how tooltips work for 2.0

judging by the 2.0 documentation, nothing's changed. tooltips are still bulky useless components

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Antway picture Antway  路  3Comments

dschreij picture dschreij  路  3Comments

alterhu2020 picture alterhu2020  路  3Comments

sebastianmacias picture sebastianmacias  路  3Comments

milleraa picture milleraa  路  3Comments