Template:InlineIcon
Usage
Basic
{{InlineIcon|Steel_Icon.png}}
<!--or-->
{{InlineIcon|filename=Steel_Icon.png}}
↓
Custom icon height
Allows to set custom height in pixels to the icon.
60 pixels in height
If wanted, it can enabled. The the next section for details.
{{InlineIcon|Steel_Icon.png|height=60}}
↓
Some text above.
This is the icon somewhere inside the text.
The text that's after.
60 pixels in height, but with vertical offset negation disabled
This allows for the icon to offset the text above/below it, preventing overlap of large icons with text.
{{InlineIcon|Steel_Icon.png|height=60|negate vertical offset=0}}
↓
Some text above.
This is the icon somewhere inside the text.
The text that's after.
Icon vertical align
The icon can be vertically aligned using one of the options for File:
vertical align: https://www.mediawiki.org/wiki/Help:Images#Vertical_alignment.
{{InlineIcon|Steel_Icon.png|Steel|height=12|icon vertical align=bottom}}
↓
Labels
Allows to add any text to one or both sides of the icon.
Left label
{{InlineIcon|Steel_Icon.png|left label=Steel}}
↓
Right label
{{InlineIcon|Steel_Icon.png|right label=Steel}}
<!--or-->
{{InlineIcon|Steel_Icon.png|Steel}}
↓
With both labels
{{InlineIcon|Steel_Icon.png|left label=Go for it!|right label=I'm a total Steel!}}
↓
Label gap
Allows to add spacing between the icon and the label
{{InlineIcon|Steel_Icon.png|Steel|label gap=10px}}
<!--or-->
{{InlineIcon|Steel_Icon.png|Steel|gap=10px}}
<!-- with both labels -->
{{InlineIcon|Steel_Icon.png|left label=Steel|right label=METAL METAL METAL|gap=10px}}
↓
<!-- with both labels -->
Bold labels
To make labels bold, use this option:
{{InlineIcon|Steel_Icon.png|Steel|bold=1}}
<!--or-->
{{InlineIcon|Steel_Icon.png|Steel|b=1}}
↓
Vertical align
A vertical align option is supported for the element that contains the icon and the labels.
Unlike the "icon vertical align" option, this one uses the CSS "vertical-align": https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align
{{InlineIcon|Steel_Icon.png|Steel|vertical align=super}}
↓
Links
Allows to add a link to both icon and the labels (if present).
Link to Steel
{{InlineIcon|Steel_Icon.png|link=Steel}}
↓
Link to Steel with labels
<!-- right label only -->
{{InlineIcon|Steel_Icon.png|Steel|link=Steel}}
<!-- left label only -->
{{InlineIcon|Steel_Icon.png|left label=Steel|link=Steel}}
<!-- both labels -->
{{InlineIcon|Steel_Icon.png|left label=Steel|right label=METAL METAL METAL|link=Steel}}
↓
<!-- right label only -->
<!-- left label only -->
<!-- both labels -->
External links
{{InlineIcon|Discord emoji - Bus.webp|link=https://discord.gg/cosmoteer|external link=1}}
<!--or-->
{{InlineIcon|Discord emoji - Bus.webp|link=https://discord.gg/cosmoteer|elink=1}}
<!--with left label only-->
{{InlineIcon|Discord emoji - Bus.webp|left label=Our Dicord server|link=https://discord.gg/cosmoteer|elink=1}}
<!--with right label only-->
{{InlineIcon|Discord emoji - Bus.webp|Our Dicord server|link=https://discord.gg/cosmoteer|elink=1}}
<!--with both labels-->
{{InlineIcon|Discord emoji - Bus.webp|left label=Our Dicord server|right label=Come in now :)|link=https://discord.gg/cosmoteer|elink=1}}
↓
<!--or-->
<!--with left label only-->
<!--with right label only-->
<!--with both labels-->
Our Dicord serverCome in now :)
Disabling icon link
To disable a link that is always present on an icon, pass "0" to link
parameter.
{{InlineIcon|Discord emoji - Bus.webp|link=0}}
↓
Label
Wrapping
Forced to wrap Go for it!I'm a total Steel! mid sentence - doesn't break.
Usage within other markup
In a table
Inline in a table cell, inside other text. Renders the same way.
Inline in a table cell, on its own. Renders the same way.
Adds the given image into text as an icon (just a small image). Allows adding labels on both sides, turning the icon (and the labels) into links, controlling how the vertical offset behaves on larger icons. The default icon size is 22px.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Filename | filename 1 | Icon filename
| File | required |
Label (left) | left label | A label to add to the left of the icon. | Line | optional |
Label (right) | right label 2 | A label to add to the right of the icon. | Line | optional |
Bold | bold b | Whether to make the label text bold.
| Boolean | suggested |
Vertical align | vertical align | Vertical align for the element containing labels and the icon. Unlike "icon vertical align", this option uses the CSS parameter "vertical align": https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align
| String | optional |
Label gap | label gap gap | Spacing between icon and labels.
| String | suggested |
Link | link 3 | Sets a link to icon and labels. By default, the icon has a link to its file page. You can also pass "0" to disable the icon link altogether. | Page name | optional |
External link? | external link elink | If set, the link parameter will be assumed to be an external link, correctly formatting the result.
| Boolean | optional |
Icon height (px) | height | Icon height in pixels.
| Number | optional |
Icon vertical align | icon vertical align | The vertical align of the icon. Unlike the "vertical align" option, uses the vertical align parameter of "File:": https://www.mediawiki.org/wiki/Help:Images#Vertical_alignment
| String | optional |
Negate vertical offset | negate vertical offset | If disabled, the icon will offset the text vertically if its height is larger than 18 pixels.
| Boolean | optional |