Template:IconBox/doc: Difference between revisionsGive feedback
Update data attribute names after the iconbox- rename (with help from vergir-bot LLM) |
Document the "enhanced" state (with help from vergir-bot LLM) |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
== Usage == | == Usage == | ||
{{tl|IconBox}} displays a box with a colored header, an icon, and a body of text | {{tl|IconBox}} displays a box with a colored header, an icon, and a body of text. | ||
Used by {{tl|AbilityInteraction}}. | |||
== Parameters == | == Parameters == | ||
| Line 9: | Line 9: | ||
<templatedata> | <templatedata> | ||
{ | { | ||
"description": " | "description": "", | ||
"params": { | "params": { | ||
"title": { | "title": { | ||
| Line 39: | Line 39: | ||
}, | }, | ||
"state": { | "state": { | ||
"description": "Set to disabled to gray out the icon, | "description": "Set to disabled to gray out the icon, partial to gray out half of it, or enhanced to add a blue glow.", | ||
"type": "string", | "type": "string", | ||
"suggestedvalues": [ "disabled", "partial" ] | "suggestedvalues": [ "disabled", "partial", "enhanced" ] | ||
} | } | ||
}, | }, | ||
| Line 48: | Line 48: | ||
} | } | ||
</templatedata> | </templatedata> | ||
== Examples == | == Examples == | ||
| Line 75: | Line 67: | ||
| text = This ability benefits from Melee damage bonuses. | | text = This ability benefits from Melee damage bonuses. | ||
}} | }} | ||
== Data attributes == | |||
The box carries several data attributes: | |||
* {{code|data-iconbox-icon}}, | |||
* {{code|data-iconbox-title}}, | |||
* {{code|data-iconbox-state}} on its wrapper element. | |||
These are used by [[Module:AbilitySection]] to apply correct styling to its own elements. | |||
<noinclude>[[Category:Template documentation]]</noinclude> | <noinclude>[[Category:Template documentation]]</noinclude> | ||
Latest revision as of 10:09, 2 August 2026
Usage
[edit source]{{IconBox}} displays a box with a colored header, an icon, and a body of text.
Used by {{AbilityInteraction}}.
Parameters
[edit source]| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| title | title | Text shown in the box header. | String | required |
| text | text | Wikitext shown in the box body. May contain wikilinks, templates such as AbilityIcon, and lists. | Content | optional |
| type | type | Header color: positive (green), negative (red), or info (blue).
| String | required |
| iconfile | iconfile | File name of the icon image, without the File: prefix.
| String | required |
| link | link | Where the header and icon link. A bare page name (e.g. Healing Booster) or a full URL.
| String | required |
| state | state | Set to disabled to gray out the icon, partial to gray out half of it, or enhanced to add a blue glow.
| String | optional |
Examples
[edit source]{{IconBox
| type = positive
| iconfile = Melee Charge.png
| link = Melee Charge
| title = Melee
| text = This ability benefits from Melee damage bonuses.
}}
This ability benefits from Melee damage bonuses.
Data attributes
[edit source]The box carries several data attributes:
data-iconbox-icon,data-iconbox-title,data-iconbox-stateon its wrapper element.
These are used by Module:AbilitySection to apply correct styling to its own elements.