Jump to content

Template:Icon box

From dissonant.dev wiki
Revision as of 18:03, 19 May 2025 by Knuxify (talk | contribs) (Created page with "<noinclude> {{Template}} This is a template for a box with an icon, largely inspired by Wikipedia's {{wikipedia|Template:Mbox}}. It's mainly used for license boxes. {{Icon box | box-icons = 28px|link=|Icon | box-text = This is an example of the icon box.<br>I can also use HTML tags and MediaWiki syntax, like links. }} <pre> {{Icon box | box-icons = 28px|link=|Icon | box-text...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:Template This is a template for a box with an icon, largely inspired by Wikipedia's Template:Wikipedia. It's mainly used for license boxes.

Icon This is an example of the icon box.
I can also use HTML tags and MediaWiki syntax, like links.
{{Icon box
| box-icons = [[File:Icon-numix-light-start-here.svg|28px|link=|Icon]]
| box-text = This is an example of the icon box.<br>I can also use HTML tags and [[Templates|MediaWiki syntax, like links]].
}}
Icon This is an example license box.
{{Icon box
| box-icons = [[File:Icon-numix-light-start-here.svg|28px|link=|Icon]]
| box-text = This is an example license box.
| border-color = #88a
| border-width = 3px
| background = #f7f8ff
}}
Note This is a box with no side margins.
{{Icon box
| box-icons = [[File:Icon-numix-light-start-here.svg|20px|link=|Note]]
| box-text = This is a box with no side margins.
| border-color = #ac6600
| border-width = 1px
| background = #f6efe5
}}

Template:Note


Floating box with an icon and background. Used for licensing templates, Template:Note and similar boxes.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Box textbox-text

Text inside of the box.

Contentrequired
Box iconsbox-icons

Standard wikitext containing the icons to place inside of the box, see example syntax.

Contentsuggested
Text colorcolor

Text color in any format supported by CSS (hex, rgb(...), ...)

Auto value
inherit
Stringoptional
Background colorbackground

Background color in any format supported by CSS (hex, rgb(...), ...)

Auto value
inherit
Stringoptional
Border colorborder-color

Text color in any format supported by CSS (hex, rgb(...), ...)

Auto value
#eaecf0
Stringoptional
Border styleborder-style

CSS border-style value

Example
solid
Auto value
solid
Stringoptional
Border widthborder-width

Border width with unit

Example
1px
Auto value
1px
Stringoptional
Paddingpadding

Padding to add to the box, with the unit

Auto value
0.35em
Stringoptional
HTML rolerole

HTML accessible role parameter to add to the box.

Auto value
text container
Stringoptional
HTML classclass

HTML class/classes to add to the box.

Stringoptional