Template:Clickable button
Jump to navigation
Jump to search
[edit] []
Template documentation
| This template was originally sporked from w:Template:Clickable button Template documentation imported from sites like Wikipedia may have information irrelevant/inapplicable to Uncyclopedia. Use discretion, and some common sense! |
| This template uses Lua: |
This template styles a link like a button, using the deprecated mediawiki.ui.button module. This expands the clickable area and tap target for the link.
Usage
- All parameters
{{Clickable button|wikilink|display|color=color|url=url|class=class|link=}}- wikilink
- Unnamed first parameter; the title of the page being linked. Brackets are not necessary
- display (optional)
- Optional unnamed second parameter; the text to display. Not needed if the text to display is the wikilink itself
|color=or|class=- Color to display.
|color=acceptsblueandred,|class=acceptsmw-ui-progressiveandmw-ui-destructive |url=- URL to link through the button. If no wikilink/display text is provided, will show the URL, otherwise will show the wikilink/display text
|link=no- Use this parameter set to "no" to display a button without linking to anything
Examples
Wikilinks
- {{Clickable button|Main Page}} →
- {{Clickable button|Main Page|Click here to visit the main page}} →
- {{Clickable button|Click here|link=no}}
Colors
- {{Clickable button|Main Page}} → – without defined
|color=and|class=, the default is a white button - {{Clickable button|Main Page|color=blue}} →
- {{Clickable button|Main Page|color=red}} →
- {{Clickable button|Main Page|class=mw-ui-progressive}} →
- {{Clickable button|Main Page|class=mw-ui-destructive}} →
URLs
- {{Clickable button|url=https://example.com}} →
- {{Clickable button|Example|url=https://example.com}} →
- {{Clickable button|2=Example|url=https://example.com}} →
See also
- commons:Template:Clickable button, corresponding clickable button at Commons.
- Wikimedia design style guide advice on buttons