Template:ColorBox
{{{content}}}
ColorBox is a customizable box that includes a colored title bar and separate content area. It is often used in combination with {{ContentGrid}}.
How to use
Parameters
All parameters are case sensitive.
| Parameter | Allowed values | Notes |
|---|---|---|
width
|
String | Optional. Sets a maximum width for the box. |
t-background
|
List of colors » | Sets the background color of the title bar. If using a color template, use the whole name, e.g. {{Emerald color}}. Don't include #. Defaults to {{bulba color light}}.
|
t-background2
|
List of colors » | Optional. Allows for a second title bar color. If using a color template, use the whole name, e.g. {{Emerald color}}. Don't include #.
|
t-color
|
List of colors » | Sets the title bar text color. Don't include #. Defaults to 000.
|
t-align
|
left • right • center • justify
|
Sets the alignment of the tile in the title bar. Defaults to center.
|
t-pad
|
String | The padding around the title. Defaults to 0.5em 1em 0.5em 1em.
|
icon
|
File name | Optional. Allows for an icon to be displayed in the title bar. Don't include File:.
|
icon-size
|
String | Sets the size of the icon. Must include px. Defaults to 20px.
|
title
|
String | The title to be displayed on the title bar. |
margin
|
String | The margin around the box. Defaults to 0.5em 0.5em 1em 0.5em.
|
c-background
|
List of colors » | Sets the background color of the content area. If using a color template, use the whole name, e.g. {{Emerald color}}. Don't include #. Defaults to FFF.
|
c-color
|
List of colors » | Sets the content area text color. Don't include #. Defaults to 000.
|
c-align
|
left • right • center • justify
|
Sets the alignment of the text in the content area. Defaults to left.
|
c-pad
|
String | The padding around the content. Defaults to 0.5em 1em 0.5em 1em.
|
content
|
String | The content to be displayed in the content area. |
Examples
Example 1
{{ColorBox
| t-background = CCC
| icon = Bulbagarden Archives bulb.png
| title = {{color2|000|a:Main Page|Bulbagarden Archives}}
| content = <nowiki/>
* [[a:Help:FAQ|FAQ]]
* [[a:Help:Uploading images|Uploading images]]
* [[a:Archives:Tagging images|Tagging images]]
* [[a:Archives:Manual of style|Manual of style]]
}}
Example 2
{{ColorBox
| c-align = center
| title = [[File:BMGf bulb.png|90px|link=https://bulbagarden.net/forums/bulbawiki-forum.195/]]
| content = [https://bulbagarden.net/forums/bulbawiki-forum.195/ Ask a question on the forums]
}}
Example 3
{{ColorBox
| t-background = {{diamond color}}
| t-background2 = {{pearl color}}
| c-align = center
| title = {{color2|FFF|Walkthrough:Pokémon Diamond and Pearl|Pokémon Diamond & Pearl}}
| content = [[File:Diamond EN boxart.jpg|150px|border|link=Walkthrough:Pokémon Diamond and Pearl]] [[File:Pearl EN boxart.jpg|150px|border|link=Walkthrough:Pokémon Diamond and Pearl]]
}}
Example 4
{{ColorBox
| width = 1100px
| t-background = {{bulba color}}
| t-align = left
| t-pad = 0 0 0 15px
| title = <small>Reminder:</small>
| content = <nowiki/>
* When replying to someone, [[Help:Wikicode#Indented text|indent your comment]] by starting a new line with a colon <code>:</code> .
* Please {{bp|Signature policy|sign your comment}} by pressing the signature button [[File:Signature button.png|28px]] or by adding four tildes <code>~~<nowiki/>~~</code> at the end of your message.
* Always remember to follow the '''[[Bulbapedia:Code of conduct|code of conduct]]''' and '''[[Bulbapedia:Talk page policy|talk page policy]]'''.
| c-pad = 1px
}}
- When replying to someone, indent your comment by starting a new line with a colon
:. - Please sign your comment by pressing the signature button
or by adding four tildes ~~~~at the end of your message. - Always remember to follow the code of conduct and talk page policy.
TemplateData
Colorbox is a customisable box that includes a colored title bar and seperate content area. It if often used in combination with the ContentGrid template.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Box width | width | Optional. Sets a maximum width for the box.
| Unknown | optional |
| Title background | t-background | Sets the background color of the title bar. Either a hex value (don't include a #), or a color template.
| Line | optional |
| Title background 2 | t-background2 | Optional. Allows for a second title bar color. Either a hex value (don't include a #), or a color template.
| Line | optional |
| Title text color | t-color | Sets the title bar text color. Either a hex value (don't include a #), or a color template.
| Line | optional |
| Title alignment | t-align | Sets the alignment of the tile in the title bar.
| Line | optional |
| Title padding | t-pad | The padding around the title.
| Unknown | optional |
| Icon | icon | Optional. Allows for an icon to be displayed in the title bar (don't include File:).
| File | optional |
| Icon size | icon-size | Sets the size of the icon. Must include px.
| Line | optional |
| Title | title | The title to be displayed on the title bar. | Line | required |
| Margin | margin | The margin around the box.
| Unknown | optional |
| Content background | c-background | Sets the background color of the content area. Either a hex value (don't include a #), or a color template.
| Line | optional |
| Content text color | c-color | Sets the content area text color. Either a hex value (don't include a #), or a color template.
| Line | optional |
| Content alignment | c-align | Sets the alignment of the text in the content area.
| Line | optional |
| Content padding | c-pad | The padding around the content.
| Unknown | optional |
| Content | content | The content to be displayed in the content area. | String | required |