Tooltip
Tooltips should be used to provide quickly understandable information to the users in a non-distracting way. Make sure that the tooltips you add are specific and help the user accomplish their goals faster and with more confidence.
Default
Copy Pug Copy HTML Show code Hide codee-tooltip
Eiusmod ipsum est qui
<e-tooltip content="This is the tooltip of the text <strong>qweqweqweqwe</strong>">
<b>
tooltip
</b>
</e-tooltip>
Proident sunt velit voluptate <e-tooltip content="This is the tooltip of the text <strong>qweqweqweqwe</strong>"><b>tooltip</b></e-tooltip>Directions
Top (default) Copy Pug Copy HTML Show code Hide codeplacement="top"
Aliquip velit aute ullamco
<e-tooltip content="tooltip content" placement="top">
<b>
tooltip
</b>
</e-tooltip>
Dolor non excepteur in <e-tooltip content="tooltip content" placement="top"><b>tooltip</b></e-tooltip>Bottom Copy Pug Copy HTML Show code Hide codeplacement="bottom"
Do pariatur esse ex
<e-tooltip content="tooltip content" placement="bottom">
<b>
tooltip
</b>
</e-tooltip>
Nostrud qui dolor sed <e-tooltip content="tooltip content" placement="bottom"><b>tooltip</b></e-tooltip>Left Copy Pug Copy HTML Show code Hide codeplacement="left"
Veniam laboris fugiat cillum
<e-tooltip content="tooltip content" placement="left">
<b>
tooltip
</b>
</e-tooltip>
Adipiscing ullamco ut cillum <e-tooltip content="tooltip content" placement="left"><b>tooltip</b></e-tooltip>Right Copy Pug Copy HTML Show code Hide codeplacement="right"
Tempor dolor velit laborum
<e-tooltip content="tooltip content" placement="right">
<b>
tooltip
</b>
</e-tooltip>
In ut ex est <e-tooltip content="tooltip content" placement="right"><b>tooltip</b></e-tooltip>Advanced Directions
Top-Start Copy Pug Copy HTML Show code Hide codeplacement="top-start"
Duis do lorem aliqua
<e-tooltip content="tooltip content" placement="top-start">
<b>
tooltip
</b>
</e-tooltip>
Irure nostrud ut sint <e-tooltip content="tooltip content" placement="top-start"><b>tooltip</b></e-tooltip>Top-End Copy Pug Copy HTML Show code Hide codeplacement="top-end"
Eiusmod fugiat est in
<e-tooltip content="tooltip content" placement="top-end">
<b>
tooltip
</b>
</e-tooltip>
Fugiat elit aute commodo <e-tooltip content="tooltip content" placement="top-end"><b>tooltip</b></e-tooltip>Bottom-Start Copy Pug Copy HTML Show code Hide codeplacement="bottom-start"
Cupidatat aute mollit velit
<e-tooltip content="tooltip content" placement="bottom-start">
<b>
tooltip
</b>
</e-tooltip>
Velit irure anim exercitation <e-tooltip content="tooltip content" placement="bottom-start"><b>tooltip</b></e-tooltip>Bottom-End Copy Pug Copy HTML Show code Hide codeplacement="bottom-end"
Irure do id sunt
<e-tooltip content="tooltip content" placement="bottom-end">
<b>
tooltip
</b>
</e-tooltip>
Cupidatat mollit pariatur commodo <e-tooltip content="tooltip content" placement="bottom-end"><b>tooltip</b></e-tooltip>Left-Start Copy Pug Copy HTML Show code Hide codeplacement="left-start"
Occaecat in veniam in
<e-tooltip content="tooltip content" placement="left-start">
<b>
tooltip
</b>
</e-tooltip>
Laborum laborum dolore anim <e-tooltip content="tooltip content" placement="left-start"><b>tooltip</b></e-tooltip>Left-End Copy Pug Copy HTML Show code Hide codeplacement="left-end"
Nisi laborum ut ipsum
<e-tooltip content="tooltip content" placement="left-end">
<b>
tooltip
</b>
</e-tooltip>
Anim id incididunt voluptate <e-tooltip content="tooltip content" placement="left-end"><b>tooltip</b></e-tooltip>Right-Start Copy Pug Copy HTML Show code Hide codeplacement="right-start"
Sit ullamco laborum ea
<e-tooltip content="tooltip content" placement="right-start">
<b>
tooltip
</b>
</e-tooltip>
Velit velit in in <e-tooltip content="tooltip content" placement="right-start"><b>tooltip</b></e-tooltip>Right-End Copy Pug Copy HTML Show code Hide codeplacement="right-end"
Nisi esse do exercitation
<e-tooltip content="tooltip content" placement="right-end">
<b>
tooltip
</b>
</e-tooltip>
Minim nostrud quis sint <e-tooltip content="tooltip content" placement="right-end"><b>tooltip</b></e-tooltip>Variations
Maximum width Copy Pug Copy HTML Show code Hide codewidth="200"
Elit ut in ipsum
<e-tooltip content="long tooltip content with <strong>html</strong>, long tooltip content with <strong>html</strong>" width="200">
<b>
tooltip
</b>
</e-tooltip>
Cillum esse consequat magna <e-tooltip content="long tooltip content with <strong>html</strong>, long tooltip content with <strong>html</strong>" width="200"><b>tooltip</b></e-tooltip>Block instead of inline Copy Pug Copy HTML Show code Hide code[block]
<e-tooltip content="tooltip content" block>
<input class="e-input" placeholder="Placeholder">
</e-tooltip>
<e-tooltip content="tooltip content" block><input class="e-input" placeholder="Placeholder"></e-tooltip>Helper tooltip Copy Pug Copy HTML Show code Hide codetype="helper"
Dolor amet consequat eu
<e-tooltip content="tooltip content" type="helper"></e-tooltip>
Aliqua esse deserunt enim <e-tooltip content="tooltip content" type="helper"></e-tooltip>Hoverable tooltip Copy Pug Copy HTML Show code Hide codehas-action
Ipsum occaecat veniam culpa
<e-tooltip content="tooltip content" type="helper" has-action></e-tooltip>
Eiusmod lorem quis ipsum <e-tooltip content="tooltip content" type="helper" has-action></e-tooltip>Inverse tooltip Copy Pug Copy HTML Show code Hide codeinverse
Aliqua culpa voluptate in
<e-tooltip content="tooltip content" type="helper" inverse></e-tooltip>
Irure sit tempor est <e-tooltip content="tooltip content" type="helper" inverse></e-tooltip>Disabled tooltip Copy Pug Copy HTML Show code Hide codedisabled
Consequat laborum sint fugiat
<e-tooltip content="tooltip content" type="helper" disabled></e-tooltip>
Reprehenderit ut ipsum ut <e-tooltip content="tooltip content" type="helper" disabled></e-tooltip>Permission Copy Pug Copy HTML Show code Hide code[permission]
Minim ea id nulla
<e-tooltip content="Permission denied: <b>Segment / Delete</b>" permission>
<e-icon icon="trash-o" type="table"></e-icon>
</e-tooltip>
Veniam ea amet duis <e-tooltip content="Permission denied: <b>Segment / Delete</b>" permission><e-icon icon="trash-o" type="table"></e-icon></e-tooltip>Table row tooltip Copy Pug Copy HTML Show code Hide codeis="e-tooltip-tr"
<div class="e-row">
<div class="e-col-3">
</div>
<div class="e-col-5">
<table class="e-table">
<thead>
<tr>
<th>
Cillum nostrud
</th>
<th>
Laboris aute
</th>
</tr>
</thead>
<tbody>
<tr is="e-tooltip-tr" content="tooltip content" placement="left">
<td>
Anim id esse pariatur ea
</td>
<td>
Non in proident in ullamco
</td>
</tr>
<tr is="e-tooltip-tr" content="tooltip content" placement="right">
<td>
Excepteur dolore nostrud sed mollit
</td>
<td>
Ex id voluptate tempor consequat
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="e-row"><div class="e-col-3"> </div><div class="e-col-5"><table class="e-table"><thead><tr><th>Ut minim </th><th>Labore est </th></tr></thead><tbody><tr is="e-tooltip-tr" content="tooltip content" placement="left"><td>Ad culpa minim dolor aliqua </td><td>Do officia in consectetur labore </td></tr><tr is="e-tooltip-tr" content="tooltip content" placement="right"><td>Tempor reprehenderit quis ex ut </td><td>Amet mollit ullamco ipsum reprehenderit </td></tr></tbody></table></div></div>| Mollit lorem | In labore |
|---|---|
| Dolor incididunt nulla cillum dolore | Lorem lorem fugiat fugiat duis |
| Excepteur reprehenderit in enim in | Enim dolore velit dolor pariatur |
API Reference
Properties
| Name | Description | Type | Required | Default value |
|---|---|---|---|---|
| content | The text of the tooltip, it can be HTML content too. | string | - | |
| placement | Position of the tooltip relative to the trigger element. | string | top | |
| width | Pass an integer value to set a maximum width in pixels. | integer | - | |
| type | Right now the only type is "helper" which creates a simple box with a question mark. | string | - | |
| has-action | If you want to put link in the content, use this attribute | boolean | false | |
| disabled | If you want to temporally disable the tooltip, use this attribute | boolean | false | |
| inverse | If you want to show the tooltip with dark background color, use this attribute | boolean | false | |
| permission | If you want to show permission information in tooltip, use this attribute | boolean | false |
| Parameter | Value |
|---|---|
| placement | top | bottom | left | right | top-start | top-end | bottom-start | bottom-end | left-start | left-end | right-start | right-end |
| type | helper |
| attribute | has-action | disabled | inverse |
Related components
Old tooltip (deprecated)Tooltip
Tooltips should be used to provide quickly understandable information to the users in a non-distracting way. Make sure that the tooltips you add are specific and help the user accomplish their goals faster and with more confidence.
Structure
Best practices
Tooltips should:
- Be provided for every element without labels, telling the name of that element. Users should never have to guess what an element means. This includes icons, images, numbers, charts.
- Use the "?" icon only if attached to a specific label or element. Free standing "?" are bound to be general and won't help users in their specific task.
- Should strive to be specific in the context (eg. "Edit email" instead "Edit").
- Use the user’s terms instead of technical terms. Eg. instead of “Email client screen” use “Email preview”
Try to avoid:
- Having too many "?" tooltips on page, there should be a strong reason for every added one. Instructions and general feature information should go the documentation. Instead of adding a tooltip improve the microcopy or the design.
- Tooltips longer than about 2 sentences long (100-150 characters). This length makes it easier for the users to quickly understand what is important, and doesn't force them to interrupt their task by reading long chunks of text. Long tooltips may also cover important UI elements. Add further information to the documentation and provide a link.
##Content guidelines
Tooltip length
Shorten tooltips by:
- Not mentioning the technical name of the UI element, eg. use “Email clients” instead of “Email client list”.
- Not repeating that is obvious because of the context of the tooltip. Eg. use “Previous” instead of “Previous email client”