Template:Button View history

m (make gradient optional)
(add template data)
Line 1: Line 1:
<span class="nowrap" title="This is not a clickable button; it illustrates the button one should find." style="padding:{{{padTB|.2em}}} {{{padLR|.6em}}}; border:1px solid; border-color:#AAA #555 #555 #AAA; {{border-radius|3px}} background-color: {{{bgcolor|#F2F2F2}}}; {{#ifeq:{{{gradient|}}}{{lc:no}}||{{linear-gradient|top|#FCFCFC, #E0E0E0}}}} {{#ifeq:{{{format|}}}|bold|font-weight: bold;}} {{{style|}}}">{{{text|{{{1|the button}}}}}}</span><noinclude>
<span class="nowrap" title="This is not a clickable button; it illustrates the button one should find." style="padding:{{{padTB|.2em}}} {{{padLR|.6em}}}; border:1px solid; border-color:#AAA #555 #555 #AAA; {{border-radius|3px}} background-color: {{{bgcolor|#F2F2F2}}}; {{#ifeq:{{{gradient|}}}{{lc:no}}||{{linear-gradient|top|#FCFCFC, #E0E0E0}}}} {{#ifeq:{{{format|}}}|bold|font-weight: bold;}} {{{style|}}}">{{{text|{{{1|the button}}}}}}</span><noinclude>
{{documentation}}
{{documentation}}
</noinclude>
<noinclude>
<templatedata>
{
"params": {
"1": {
"label": "alternate method to add text to the button",
"type": "string",
"suggested": true
},
"padTB": {
"label": "vertical padding in em units"
},
"padLR": {
"label": "horizontal (side) padding in em units"
},
"bgcolor": {
"label": "background color",
"type": "string"
},
"format": {
"label": "use this to make text bold",
"type": "boolean",
"default": "bold"
},
"style": {
"label": "CSS style codes",
"type": "string"
},
"text": {
"label": "the text in the button",
"type": "string",
"suggested": true
}
},
"description": "Add a non-functioning button to a page as an illustration",
"paramOrder": [
"text",
"1",
"bgcolor",
"format",
"padTB",
"padLR",
"style"
]
}
</templatedata>
</noinclude>
</noinclude>

Revision as of 16:34, 5 July 2017

the button

Documentation icon Template documentation[view] [edit] [history] [purge]

This template provides a "clickable button" formatting style for text. This button is not clickable, and care should be taken when using it to avoid readers thinking the result may be. (It has an explanatory tooltip for users hovering over it, but that may not always be displayed, or only displayed after too long a delay, so that it may not show up to people trying to click it.)

If you need a clickable button, use {{Clickable button}}.

Usage

  • {{Button|button text}} produces button text


  • {{Button|[[File:WikEd close.png]]}} produces


Parameters

This template will accept the following parameters, all are optional except for the first unnamed parameter.

  • |button text This is the text that will be shown in the button. It is the only unnamed parameter
  • |bgcolor= Set the background color of the button

See also

  • {{key press}} – used to illustrate keystrokes
The above documentation is transcluded from Template:Button/doc.
Please add categories to the /doc subpage.
Subpages of this template.


Add a non-functioning button to a page as an illustration

Template parameters

ParameterDescriptionTypeStatus
the text in the buttontext

no description

Stringsuggested
alternate method to add text to the button1

no description

Stringsuggested
background colorbgcolor

no description

Stringoptional
use this to make text boldformat

no description

Default
bold
Booleanoptional
vertical padding in em unitspadTB

no description

Unknownoptional
horizontal (side) padding in em unitspadLR

no description

Unknownoptional
CSS style codesstyle

no description

Stringoptional