I’m happy to announce that tooltips are now available for every Perspective component as of the August 5th nightly build. You can find the configuration properties for this feature in the
meta category of each component.
Some important properties:
enabled: Controls whether the tooltip will be displayed on hover or if requested via scripting.
delay: How long to delay before displaying the tooltip after hover begins or after a scripting request.
sustain: How long to display the tooltip before removing it from view.
location: Where to display the tooltip in relation to the associated component - as space allows.*
tail: Controls a decorative triangle which points to the associated component. This tail does not accept direct styling at this point, but will use the background color of the tooltip.
style properties are very straight-forward.
Tooltips with various styles applied, and with/without the
In addition to these properties, we wanted to accommodate use-cases where a tooltip is desired when a user is NOT hovering over a component. Some examples include mobile sessions and directive/progressive tooltips. To manage this extra functionality, we implemented new component methods which allow for requesting a tooltip be displayed for a component as well as for removing the tooltip from a component.
requestTooltip(): Requests a tooltip be displayed with the currently configured properties. If the
enabled property for the tooltip is
false, then this function call will have no effect because the tooltip is not enabled. Example:
removeTooltip(): Removes the displayed tooltip for the component.
For pointers on how to properly use tooltips within your own project, I recommend reading this helpful guide: Tooltip Guidelines
* The “locations” available might appear misleading at first, but follow these guidelines, where the pink lines determine the boundaries available to the tooltip; this means that the tooltip will expand or determine its width away from the pink guidelines: