Template:Banner
A coloured callout box for notes, success messages, warnings, and errors. Colours follow the wiki's light and dark themes automatically.
Usage
Basic examples
{{Banner|This is an informational note.}}
{{Banner|type=success|title=Saved|Your changes have been published.}}
{{Banner|type=warning|title=Heads up|This page describes a beta feature.}}
{{Banner|type=danger|title=Warning|This action will delete your data.}}
This is an informational note.
Your changes have been published.
This page describes a beta feature.
This action will delete your data.
Alternative parameters
The variant parameter is an alias for type, and content is an alias for the unnamed message parameter.
{{Banner|variant=success|Operation completed.}}
{{Banner|content=This is the message.}}
Operation completed.
This is the message.
Custom icons
Specify an icon from Template:Icon, or use icon=none to hide the icon.
{{Banner|icon=lightbulb|title=Tip|Try this approach.}}
{{Banner|icon=none|A banner without an icon.}}
Try this approach.
A banner without an icon.
Content containing equals signs
If the message contains an equals sign, use 1= or content=.
{{Banner|1=Use x=5 in your configuration.}}
{{Banner|content=Use x=5 in your configuration.}}
Parameters
Displays a themed callout banner for notes, success messages, warnings, and errors.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Message | 1 content | The main text of the banner. Supports wikitext, including links and formatting. Use 1= if the message contains an equals sign.
| Content | suggested |
| Banner type | type variant | Controls the colour and default icon of the banner. The value 'error' is also accepted as an alternative to 'danger'.
| String | suggested |
| Title | title | Optional bold heading displayed above the message.
| String | suggested |
| Icon | icon | Optional icon name supported by Template:Icon. Use 'none' to hide the icon. If omitted or empty, the icon is selected automatically based on the banner type.
| String | optional |
Notes
- If both
typeandvariantare provided, a nonemptytypetakes precedence. - If both
contentand1are provided,contenttakes precedence. - Unknown banner types use the informational appearance.
- Omitting
icon, or setting it to an empty value, uses the default icon for the selected type. - Setting
icon=nonehides the icon. - Icons are decorative and hidden from screen readers. Important information should be conveyed in the banner text.