Jump to content

Template:Icon: Difference between revisions

From Insurer Brain
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}}}.svg|{{{size|16px}}}|link=|class=noviewer|text-bottom]]<noinclude>
[[File:{{{1}}}|{{{size|16px}}}|link=|class=noviewer|text-bottom]]<noinclude>
== Documentation ==
== 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>.
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 minus the ".svg" extension.
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.svg</code> at 16px.
* '''Behavior:''' Renders <code>File:axa-brain-logo.png</code> at 16px.


'''Custom Size Override'''
'''Custom Size Override'''
If an icon needs to be slightly larger for a specific heading or chart, use the <code>size=</code> parameter.
If an icon needs to be larger for a specific heading, use the <code>size=</code> parameter.
* '''Code:''' <code><nowiki>{{Icon|belgium-flag|size=24px}}</nowiki></code>
* '''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. Do not include the "File:" prefix or the ".svg" extension.
* '''<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.svg at 16px.

Corporate or Project Icons (Any Format)

  • Code: {{Icon|axa-brain-logo.png}}
  • Behavior: Renders File:axa-brain-logo.png at 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).