Template:Dndbeyond tooltip/doc

From Campaigns
Jump to navigation Jump to search

Creates the content for a tooltip popup similar to the one used by D&D Beyond. This template should not generally be used directly from an article, instead a template for a specific tooltip should be created, and that should be used from an article.

The content of the tooltip can be very finicky, and breaks out of its layout easily, ruining the tooltip effect. Make sure you test any new tooltip before calling it complete! If paragraphs are breaking out of the tooltip, you can use <span class="fake-p">...</span> to try and fix it. If lists are breaking out of the tooltip, you can use <span class="fake-ul"><span class="fake-li">...</span></span> to try and fix it.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
link textlinktext

Text the user must hover over to view the tooltip.

Stringrequired
tooltip titletitle

Text displayed at the top of the tooltip window.

Stringrequired
tooltip typetype

Tag on the right side of the tooltip header.

Example
race, feat, class, etc.
Stringrequired
tooltip bodytext

Rich text body of the tooltip. Formatting likes to break, so test to make sure it works.

Stringrequired
icon representing the tooltipicon

A wiki markup image to be displayed on the left side of the title. Image will be scaled to 45x45.

Default
(omitted)
Example
[[File:aarakocra.jpg]]
Stringoptional
horizontal offsetoffsetx

Offset the tooltip from its default position by the given number of pixels.

Default
0
Numberoptional
vertical offsetoffsety

Offset the tooltip from its default position by the given number of pixels.

Default
0
Numberoptional