Template:Alert/doc: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
{{Dochead|header=metatemplate}}{{templatestyles}} | {{Dochead|header=metatemplate}}{{templatestyles}} | ||
{{Template rating|{{PAGENAME}}|rating=draft}} | {{Template rating|{{PAGENAME}}|rating=draft}} | ||
The '''Alert''' template is a metatemplate which is used to create alerts, also known as callouts or admonitions, to call attention to critical information. It is intended to be used in other templates for messages which are expected to be used on multiple pages. | |||
=== Usage === | |||
The template accepts three parameters: | |||
* <code>type</code>: Defines the color of the left border; the type should be chosen according to context, not for aesthetic reasons. Types are described in the next section. | |||
* <code>text</code>: Message to be displayed in the box. | |||
* <code>icon</code>: Icon to be displayed in the box, if provided. Icons appear on the left side of the message box. | |||
* <code>icon size</code>: Size of the icon displayed. Default is 60px. | |||
=== Types and examples === | |||
{{Alert|text=Alert of '''note''' type. |type=note}} | |||
{{Alert|text=Alert of '''tip''' type. |type=tip}} | |||
{{Alert|text=Alert of '''warning''' type. |type=warning}} | |||