Template:Userbox/doc: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
added float |
||
| Line 40: | Line 40: | ||
"type": "string", | "type": "string", | ||
"default": "#000000" | "default": "#000000" | ||
}, | |||
"float": { | |||
"label": "Float", | |||
"description": "If specified, the userbox becomes a floating element. Should not be used in a userbox tower.", | |||
"type": "string", | |||
"suggestedvalues": [ | |||
"left", | |||
"right" | |||
], | |||
"default": "none" | |||
} | } | ||
}, | }, | ||
| Line 49: | Line 59: | ||
"image bg color", | "image bg color", | ||
"border color", | "border color", | ||
"text color" | "text color", | ||
"float" | |||
], | ], | ||
"format": "inline" | "format": "inline" | ||
| Line 56: | Line 67: | ||
==Example usage== | ==Example usage== | ||
<pre>{{userbox|BTD6 round HeroIconQuincy.png|This user is a son of Quincy.|bg color=#323232|image bg color=#404040|border color=#c1c1c1|text color=#ffffff}}</pre> | <pre>{{userbox|BTD6 round HeroIconQuincy.png|This user is a son of Quincy.|bg color=#323232|image bg color=#404040|border color=#c1c1c1|text color=#ffffff|float=right}}</pre> | ||
{{userbox|BTD6 round HeroIconQuincy.png|This user is a son of Quincy.|bg color=#323232|image bg color=#404040|border color=#c1c1c1|text color=#ffffff}} | {{userbox|BTD6 round HeroIconQuincy.png|This user is a son of Quincy.|bg color=#323232|image bg color=#404040|border color=#c1c1c1|text color=#ffffff|float=right}} | ||
<includeonly>[[Category:Userboxes]]</includeonly><noinclude>[[Category:Documentation]]</noinclude> | <includeonly>[[Category:Userboxes]]</includeonly><noinclude>[[Category:Documentation]]</noinclude> | ||
Latest revision as of 04:58, 6 November 2024
Customizable rectangles to display on your userpage. Colors can be specified with a hexadecimal code (must include the "#") or the name of a CSS-supported color (e.g. "pink" or "mauve"). Please avoid using variables for colors (e.g. "var(--bg-primary)"), since userboxes are designed to be theme-agnostic.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Image | 1 | The image to display in the box.
| File | required |
| Text | 2 | The text to display in the userbox.
| String | required |
| Background color | bg color | The primary background color of the userbox.
| String | optional |
| Image background color | image bg color | The color of the background behind the userbox's image.
| String | optional |
| Border color | border color | The color of the userbox's border.
| String | optional |
| Text color | text color | The color of the text in the userbox.
| String | optional |
| Float | float | If specified, the userbox becomes a floating element. Should not be used in a userbox tower.
| String | optional |
Example usage
{{userbox|BTD6 round HeroIconQuincy.png|This user is a son of Quincy.|bg color=#323232|image bg color=#404040|border color=#c1c1c1|text color=#ffffff|float=right}}
| This user is a son of Quincy. |