Template:IconText

From bg3.wiki
Jump to navigation Jump to search
Template documentation

Displays an icon with text.

Usage

The default size is x40px meaning the icon is scaled until the height is 40 px. It's usually important to limit the height since the icons are used inline, and a very high inline image makes for an unpleasant text layout.

Icon Size

The width can be set via the w parameter. This could be useful if several elements are supposed to align vertically for design purposes, such as in the following table shown on our main page as of the writing of this documentation. This also uses the block and gap parameters. (View the source of this page for usage.)

Blocks

Setting block to yes ensures that if the text part has to break into multiple lines, the second line doesn't flow under the icon and instead the text is constrained into a rectangular block. The gap parameter can only be provided if block is set to yes, and determines the gap (in px) between the icon and the aforementioned rectangular text block.

Examples

Example Markup Renders as
Default
{{IconText | Flourish Icon.png | Flourish }}
Flourish Flourish
With link
{{IconText | Flourish Icon.png | Custom Text | link = Flourish }}
Custom Text Custom Text
Adjusting size
{{IconText | size = 25 | Flourish Icon.png | Flourish }}
Flourish Flourish
With size and link
{{IconText | size = 25 | Flourish Icon.png | Custom Text | link = Flourish }}
Custom Text Custom Text
Missing icon
{{IconText | Missing Icon 123.png | Flourish | size = 30 }}
Flourish Flourish