FANDOM


{{MessageBox}} is a template for creating message boxes.

Parameters

For examples of how to use these parameters, see #Examples.

Parameter name Description Default
class Additional classes to the root .mbox element.
bordercolor The color of the thick left-most border. Stylesheet default
type Type of mbox as declared as in CSS with variables. Affects color of the thick left-most border. See #Using types.
bgcolor The color of the mbox's background. Stylesheet default
style Additional inline styles to the root .mbox element.
image An image to be added to the left of all text content.
imagewidth The width of the image (height automatically adjusts). 60px
imagelink The link to which the image points (could link to the relevant maintenance category, per example). If not included, the image will be un-clickable.
header The header (bold text placed at the top). This is typically used to very briefly explain the subject of the mbox itself, as when the mbox is closed, only the header will show.
text Non-bold text placed below the header, typically used to explain the subject of the mbox in further or additional detail. When the mbox is closed, this text will be hidden.
comment Smaller non-bold text placed below the main text, typically used to add additional links or context about the notice. When the mbox is closed, this text will be hidden.
aside Text placed within a small allocation on the right side separated by a light gray border. Most commonly used to show shortcuts to the page in question (such as on policy pages). When the mbox is closed, this text will be hidden.
id By default, one close button will close all mboxes on the page. However, to change this, this parameter may be used, given as the name of the mbox implementation (e.g., "Template:Cleanup" would have |id=cleanup).
collapsed By default, the mbox will be uncollapsed, and the full contents will be shown. However, to change this, this parameter may be used to set an mbox as collapsed by default (e.g., |collapsed=true would set the mbox to be collapsed by default).

Examples

Basic MessageBox

Header text here
Normal text here
{{MessageBox
| header = Header text here
| text   = Normal text here
| id     = test1
}}

Using types

Header text here
Normal text here
{{MessageBox
| type   = important
| header = Header text here
| text   = Normal text here
| id     = test2
}}

With an image

Wiki-wordmark
Header text here
Normal text here
{{MessageBox
| header     = Header text here
| text       = Normal text here
| image      = Wiki-wordmark.png
| imagelink  = 
| imagewidth = 50px
| id         = test3
}}

With an aside and moderate type

Header text here
Normal text here
Aside text here
{{MessageBox
| type   = moderate
| header = Header text here
| text   = Normal text here
| aside  = Aside text here
| id     = test4
}}

Standard/default style with minor type

Wiki-wordmark
Header text here
Normal text here
Comment text here
Aside text here
{{MessageBox
| type    = minor
| header  = Header text here
| text    = Normal text here
| comment = Comment text here
| image   = Wiki-wordmark.png
| aside   = Aside text here
| id      = standard
}}
Community content is available under CC-BY-SA unless otherwise noted.