Template:Icon: Difference between revisions
Appearance
Content deleted Content added
Created page with "[[File:{{{1}}}.svg|{{{size|16px}}}|link=|class=noviewer|text-bottom]]<noinclude> == Documentation == This template displays a standalone, scalable inline SVG icon. It is designed to sit cleanly within a line of text, a data table, or a UI element without altering line heights. It automatically assumes the file is an <code>.svg</code>. === Usage === '''Standard Usage''' Provide the exact file name minus the ".svg" extension. * '''Code:''' <code><nowiki>{{Icon|belgium-fl..." |
No edit summary |
||
| Line 1: | Line 1: | ||
[[File:{{{1}}} |
[[File:{{{1}}}|{{{size|16px}}}|link=|class=noviewer|text-bottom]]<noinclude> |
||
== Documentation == |
== Documentation == |
||
This template displays a standalone, scalable inline |
This template displays a standalone, scalable inline icon. It is designed to sit cleanly within a line of text or a data table. You must include the full file name with its extension (e.g., .svg, .png). |
||
=== Usage === |
=== Usage === |
||
'''Standard Usage''' |
'''Standard Usage''' |
||
Provide the exact file name |
Provide the exact file name including the extension, but do not include the "File:" prefix. |
||
* '''Code:''' <code><nowiki>{{Icon|belgium-flag}}</nowiki></code> |
* '''Code:''' <code><nowiki>{{Icon|belgium-flag.svg}}</nowiki></code> |
||
* '''Behavior:''' Renders <code>File:belgium-flag.svg</code> at 16px. |
* '''Behavior:''' Renders <code>File:belgium-flag.svg</code> at 16px. |
||
'''Corporate or Project Icons''' |
'''Corporate or Project Icons (Any Format)''' |
||
* '''Code:''' <code><nowiki>{{Icon|axa-brain-logo}}</nowiki></code> |
* '''Code:''' <code><nowiki>{{Icon|axa-brain-logo.png}}</nowiki></code> |
||
* '''Behavior:''' Renders <code>File:axa-brain-logo. |
* '''Behavior:''' Renders <code>File:axa-brain-logo.png</code> at 16px. |
||
'''Custom Size Override''' |
'''Custom Size Override''' |
||
If an icon needs to be |
If an icon needs to be larger for a specific heading, use the <code>size=</code> parameter. |
||
* '''Code:''' <code><nowiki>{{Icon| |
* '''Code:''' <code><nowiki>{{Icon|legal-structure-icon.svg|size=24px}}</nowiki></code> |
||
* '''Behavior:''' Renders the icon at 24px instead of the default 16px. |
* '''Behavior:''' Renders the icon at 24px instead of the default 16px. |
||
=== Parameters === |
=== Parameters === |
||
* '''<code>1</code>''' (Required): The name of the file to be displayed |
* '''<code>1</code>''' (Required): The full name of the file to be displayed, including the extension (e.g., <code>.svg</code>, <code>.png</code>, <code>.jpg</code>). |
||
* '''<code>size</code>''' (Optional): Overrides the default 16px dimension (e.g., <code>12px</code>, <code>20px</code>). |
* '''<code>size</code>''' (Optional): Overrides the default 16px dimension (e.g., <code>12px</code>, <code>20px</code>). |
||
</noinclude> |
</noinclude> |
||
Latest revision as of 18:38, 6 March 2026
[[File:{{{1}}}|16px|link=|class=noviewer|text-bottom]]
Documentation
This template displays a standalone, scalable inline icon. It is designed to sit cleanly within a line of text or a data table. You must include the full file name with its extension (e.g., .svg, .png).
Usage
Standard Usage Provide the exact file name including the extension, but do not include the "File:" prefix.
- Code:
{{Icon|belgium-flag.svg}} - Behavior: Renders
File:belgium-flag.svgat 16px.
Corporate or Project Icons (Any Format)
- Code:
{{Icon|axa-brain-logo.png}} - Behavior: Renders
File:axa-brain-logo.pngat 16px.
Custom Size Override
If an icon needs to be larger for a specific heading, use the size= parameter.
- Code:
{{Icon|legal-structure-icon.svg|size=24px}} - Behavior: Renders the icon at 24px instead of the default 16px.
Parameters
1(Required): The full name of the file to be displayed, including the extension (e.g.,.svg,.png,.jpg).size(Optional): Overrides the default 16px dimension (e.g.,12px,20px).