Template:Composition bar

From Wiki - Scioly.org
Jump to: navigation, search
50 / 100
Template documentation[view] [edit] [history] [purge]

The Composition bar template displays the numeric composition of a thing in terms of its sub-units. It can also be used as a meta template.


1 - the number of subunits
2 - the total number of subunits possible
3 - (default is #C0D1E9) The third parameter is the background color of the left part of the bar - a valid web color, which can be specified by name, as a hex triplet (#rrbbgg), or rgb triplet (rgb(0–255,0–255,0–255)).
background-color - (default is transparent) is the background color of the right part of the bar - a valid web color.
border - (default is #aaa) is the color of the border, or "none" for no border
width - (default is 100px) a width value for the bar, such as "100%" or "8em" (unitless numbers are interpreted as px)
per - (default is false), when set to any value (true), adds a percentage to the bar as well
ref - (default is blank), may be used to add a reference/citation for the numbers.


Code Result
{{Composition bar|4|16}}
4 / 16
{{Composition bar|90|100|#F0F0F0|per=1|background-color=#F00}}
90 / 100 (90%)