Template:Clickable button: Difference between revisions

Template page
Content added Content deleted
m (Changed protection level of Template:Clickable button: Highly visible template ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite)))
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<span class="mw-ui-button {{#switch: {{{color|white}}} | red = mw-ui-destructive | green = mw-ui-constructive | white = | blue = mw-ui-progressive}}" role="button" aria-disabled="false">{{{1|Button text}}}</span><noinclude>
<span class="mw-ui-button {{#switch: {{{color|white}}} | red = mw-ui-destructive | green = mw-ui-constructive | white = | blue = mw-ui-progressive}}" role="button" aria-disabled="false">{{{1|Button text}}}</span><noinclude>
{{doc|{{Clickable button/doc}}}}

{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
</noinclude>

Latest revision as of 00:38, 28 March 2020

Button text

Template documentation
This is a documentation subpage for Template:Clickable button.
It contains usage information, categories and other content that is not part of the original template page.


This template creates a clickable button. There are two editable parameters. The first one, an unnamed one, is used to create the text of the button. It can support wikilinks.

Examples:

{{Clickable button|This is a button}}

produces This is a button

{{Clickable button|[[Talk:Main page|Main page talk page]]}}

produces Main page talk page

The other one, named "color", allows you to change the color of the button. You can select between three colors: white (default), blue and red.

To change the color of a button, you have to add the color parameter followed by the color name, like this: {{clickable button|Text|color=blue}}.

Examples:

  • white (default):

Button text

Button text

  • red:

Button text

Notes

  1. After the changes outlined in Phabricator task T110555 were implemented, {{Clickable button|color=green}} produces the same output as {{Clickable button|color=blue}}.
The above documentation is transcluded from Template:Clickable button/doc.


Cookies help us deliver our services. By using our services, you agree to our use of cookies.