Lightning Tooltip
A lightning:helptext component displays an icon with a popover containing a small amount of text describing an element on screen. The popover is displayed when you hover or focus on the icon that's attached to it.
By default, the tooltip uses the utility:info icon but you can specify a different icon with the iconName attribute.
Visit https://lightningdesignsystem.com/icons/#utility to view the utility icons.
Let's create tooltip component and will try to make it reusable.
LightningToolTipcmp
Above Lightning tooltip component can be reused by passing the help text as a attribute.
Reference: Lightning Web Components
No comments:
Post a Comment