leva icon indicating copy to clipboard operation
leva copied to clipboard

Tooltip name property too long

Open Angelk90 opened this issue 3 years ago • 7 comments

Hi @dbismut , as you can see in the image below, when there are names with too long properties it is not possible to read the name of the property, it would be useful to have a tooltip that shows the name when passing over the property name.

Schermata 2021-06-11 alle 19 50 37

Angelk90 avatar Jun 11 '21 17:06 Angelk90

You're right, there should be a title prop on labels. Note that the hint option on the input allows for a longer tooltip message.

dbismut avatar Jun 11 '21 18:06 dbismut

@dbismut : Trying the various examples on the Storybook, I can't find anyone using title. Does it still need to be implemented?

Angelk90 avatar Jun 11 '21 18:06 Angelk90

Yes, this needs a PR. I mean the title html prop. https://developer.mozilla.org/docs/Web/HTML/Global_attributes/title

dbismut avatar Jun 11 '21 18:06 dbismut

@dbismut : I understand, it's a pity that graphically you can't get such a result: Schermata 2021-06-11 alle 20 16 32

For example the possibility of being able to use a custom tooltip.

Angelk90 avatar Jun 11 '21 18:06 Angelk90

Custom tooltip exists with the hint prop. https://leva.pmnd.rs/?path=/story/misc-input-options--hint

dbismut avatar Jun 11 '21 18:06 dbismut

@dbismut : I missed this thing, but not using hint as description, it is not possible to customize it as for example:

  • Background color of the tooltip hint
  • Text color of the tooltip hint
  • Show the tooltip hint in a different position from above the property, for example to the left of it

Angelk90 avatar Jun 11 '21 18:06 Angelk90

Colors can be themed. For the rest no, not possible.

dbismut avatar Jun 11 '21 18:06 dbismut