{{{3}}} {{{4}}}

Description

A formatted text box for any editor to place on their user page—typically inside a {{UserInfobox}}—and customize with information about themselves, or create secondary templates for multiple users to place on their own pages.

Usage

The template's parameters are listed below. It is not necessary to name the first four parameters if they are assigned values in order, so template calls may use the shorthand form {{Userbox|color1|color2|caption|text}}.

{{Userbox
|color1=
|color2=
|caption=
|text=
|border=
|style=
|style1=
|style2=
|headerbackground=
}}

Required parameters

  1. |color1 The color of the left cell's background and the box border.
  2. |color2 The color of the right cell's background.
  3. |caption The content of the left cell. This is often an image, which will stretch the cell if not constrained to fit within a 45px × 45px space.
  4. |text The content of the right cell.

Optional parameters

  1. |border= The box border color, which defaults to color1.
  2. |style= Any additional CSS values to set for the entire box. Do not include quotation marks.
  3. |style1= Any additional CSS for the left cell.
  4. |style2= Any additional CSS for the right cell.
  5. |headerbackground= Determines whether each cell's background is automatically darkened when viewed on a web browser in dark mode. The default value is 1, which applies dark-mode behavior to the right cell only. Setting |headerbackground=0 will disable dark-mode behavior, whereas |headerbackground=2 will apply it to both cells.

Examples

Description Code Result
Implicit parameters
{{Userbox|#CCC|#EEE|blah|blah blah blah}}
blah blah blah blah
Explicit parameters
{{Userbox
|color1=#CCC
|color2=#EEE
|caption=blah
|text=blah blah blah
}}
blah blah blah blah
Different border color
{{Userbox|#CCC|#EEE|blah|blah blah blah|border=#F00}}
blah blah blah blah
Extra table styling
{{Userbox|#CCC|#EEE|blah|blah blah blah|border=#00F|style=border-style:dashed}}
blah blah blah blah
Extra cell styling
{{Userbox|#CCC|#EEE|blah|blah blah blah|style1=color:#F00|style2=color:#00F}}
blah blah blah blah
Fully preserved in dark mode
{{Userbox|#CCC|#EEE|blah|blah blah blah|style1=color:#F00|style2=color:#00F|headerbackground=0}}
blah blah blah blah
Fully reactive to dark mode
{{Userbox|#CCC|#EEE|blah|blah blah blah|style1=color:#F00|style2=color:#00F|headerbackground=2}}
blah blah blah blah

See also