Tooltips

When to use

Tooltips are small boxes that appear when a user hovers over or clicks special icons on your page. Tooltips may enhance the usability of a page by helping contextualize content on your page.

Basic usage:

[tooltip message="Some tooltip text."]
By default, the tooltip will display a Font Awesome question-circle icon, and the tip will show when a user clicks the icon.

  1. Open the tooltip shortcode:
    [tooltip
  2. Add tooltip text using the message attribute and end the shortcode:
    message=”Some tooltip text.”]

Results

Code


[tooltip message="Some tooltip text."]

Rendering



(Click to view)

Special characters, quotation marks, asterisks etc. in a message or title value must be entered as HTML entities. See examples below. More about HTML entities at W3 Schools

Attributes: message, title, icon, position

message attribute

This is a required attribute. It’s behavior can be seen in our example. Please be sure to use HTML entities in place of quotation marks and special characters.

title attribute

title places a small title box above the the text given by the message attribute’s value. HTML entities are required for special characters.

Code


[tooltip message=""Some tooltip text in double quotation marks."" title="'A tooltip title in single quotation marks'"]

Rendering



(Click to view)

icon attribute

By default, tooltips display the Font Awesome question-circle icon. The icon attribute lets users substitute the Font Awesome info-circle icon.

Code


[tooltip message="Some tooltip text" icon="info-circle"]

Rendering



(Click to view)

DEPRECATED, do not use trigger attribute

As of 1/17/2019, the default behavior for triggering the tooltip is now on hover, focus, and click events. This update was made so keyboard users could always trigger the tooltip.

position attribute

By default, tooltips display above the icon. By using the position attribute you can place text to the position="right", left: position=left, or below position="bottom" the icon.

position="right"

Code


[tooltip message="Some tooltip text to the right of the icon" position="right"]
Rendering



(Click to view)

position="left"

Code


[tooltip message="Some tooltip text to the left of the icon" position="left"]
Rendering



(Click to view)

position="bottom"

Code


[tooltip message="Some tooltip text below the icon" position="bottom"]
Rendering



(Click to view)