Template:Tooltip/doc: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
LVL (talk | contribs)
Documentation on how to use Tooltip template
 
LVL (talk | contribs)
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Usage ==
== Usage ==
This template creates a rich tooltip that displays additional information when hovered (desktop) or tapped (mobile). It supports text, images, bullet points, and HTML tables.
This template creates a tooltip that displays additional information when hovered (desktop) or tapped (mobile). It supports text, images, bullet points, and HTML tables.
 
It creates a mobile-friendly popup that adjusts its position automatically to stay on screen.


== Examples ==
== Examples ==
Line 69: Line 67:
</table>
</table>
}}
}}


<templatedata>
<templatedata>
Line 92: Line 91:
}
}
},
},
"format": "inline",
"format": "inline"
"description": "Creates a hoverable/tappable tooltip for rich content."
}
}
</templatedata>
</templatedata>
<includeonly>[[Category:Formatting templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>
<includeonly>[[Category:Formatting templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>

Latest revision as of 04:29, 16 January 2026

This template creates a tooltip that displays additional information when hovered (desktop) or tapped (mobile). It supports text, images, bullet points, and HTML tables.

Examples

[edit source]

Basic Text

[edit source]
{{Tooltip|Damage Resist|Reduces incoming damage by a percentage.}}

Damage Resist

Using Named Parameters

[edit source]

Recommended for complex content to avoid issues with equals signs.

{{Tooltip|text=Spirit Power|hover=Increases the effectiveness of abilities and items.}}

Spirit Power

To use bullet points, start the list on a new line inside the parameter.

{{Tooltip|text=Debuffs|hover=
* Stun
* Silence
* Disarm
}}

Debuffs

  • Silence
  • Disarm

HTML Tables

[edit source]

Use standard HTML tags for tables. Do not use Wiki Table syntax ({| |}) as it breaks templates.

{{Tooltip|text=Scaling Stats|hover=
<table class="wikitable" style="margin:0; width:100%">
  <tr>
    <th>Level</th>
    <th>Bonus</th>
  </tr>
  <tr>
    <td>1</td>
    <td>+2 Spirit</td>
  </tr>
  <tr>
    <td>2</td>
    <td>+4 Spirit</td>
  </tr>
</table>
}}
Scaling Stats


No description.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Trigger Text1 text

The visible text that is underlined.

Stringrequired
Tooltip Content2 hover

The content shown inside the popup box. Supports HTML tables, images, and lists.

Contentrequired