Jump to content

Template:Badge/doc

From Creopedia

This is the documentation page for Template:Badge.

This template renders a generic badge component. It is commonly used by other templates and modules.

Usage

Basic

{{Badge|text=Badge}}

Badge

With icon

{{Badge|text=Badge|icon=icon.png}}

Badge

With colors

The color parameters can be any valid colors in CSS.

{{Badge|text=Badge|icon=icon.png|color=red|backgroundColor=blue}}

Badge

TemplateData

Renders a generic badge component

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Texttext

Badge text

Stringrequired
Iconicon

Page name without namespace for the icon.

Example
Icon.png
Filerequired
Text colorcolor

Text color. Can be any valid CSS color.

Example
#fff
Stringsuggested
Background colorbackgroundColor

Background color. Can be any valid CSS color.

Stringsuggested