Template:Badge/doc
Appearance
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
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Text | text | Badge text | String | required |
| Icon | icon | Page name without namespace for the icon.
| File | required |
| Text color | color | Text color. Can be any valid CSS color.
| String | suggested |
| Background color | backgroundColor | Background color. Can be any valid CSS color. | String | suggested |