function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
rtriggrtrigg 

How to add tooltips to lightning:input fields?

Is there an easy way to add tooltips to lightning:input fields?  My goal is to have a small lightning:icon wedged right in front of the input field's label, which when you hover over it, displays a tooltip with text from a component attribute, v.hoverText, or some such.  A couple of questions:
 
Do the new base components support tooltips at all? I tried adding “title=” but I get no-such-attribute error.  I found documentation for a lightning:tooltip tag (https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_lightning_tooltip.htm), but using it in a component throws a no-such-component error.

I can follow the SLDS documentation to build an icon (without using lightning:icon) and give it a tooltip, but how do I get that icon to be on the same line with the lightning:input field’s label? Do I need fancy css to undo the natural linebreak that occurs between components?

Thanks!

- Randy

 
sashi pandey 15sashi pandey 15
May be this will help : lightning:helptext
https://developer.salesforce.com/docs/component-library/bundle/lightning:helptext/example#lightningcomponentdemo:exampleHelptextIcon