This template creates a clickable button and adds nice styling to it.
Usage
Provides a button with hover effects.
{{Clickable button|FAQ|Frequently asked questions}}
→{{Clickable button|target={{fullurl:{{FULLPAGENAME}}|withJS=MediaWiki:VisualFileChange.js}}|text=This page with '''VisualFileChange'''|external=true}}
→{{Clickable button|:en:Wikipedia:Manual of Style/Layout|'''Wikipedia's manual of Style'''|class=ui-button-orange ui-button-large}}
→{{Clickable button|:en:Wikipedia:Twinkle/Preferences|'''Twinkle preferences'''|iconPrimary=ui-icon-wrench|class=ui-button-blue ui-button-large}}
→{{Clickable button|target={{fullurl:Special:Random/User talk|action=edit§ion=new&preloadtitle=I+love+your+work+because}}|text=Do something good|iconSecondary=ui-icon-heart|external=true|class=ui-button-red}}
→
Technical information
This template uses the jQuery UI button which is selectively loaded using MediaWiki:Common.js. Some additional bits have been added by MediaWiki's ResourceLoader itself.
TemplateData
This is the TemplateData documentation for the template used by the new VisualEditor.
Clickable button
Template for generating a nice clickable button.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Link | 1 target | The link for the button to point to. | String | optional |
Text | 2 text | The text inside the button. | String | optional |
External | 3 external | Whether the link points to an external website or a wiki page. | String | optional |
Primary icon class | 4 iconPrimary | The class for the primary icon. | String | optional |
Secondary icon class | 5 iconSecondary | The class for the secondary icon. | String | optional |
Class | class | Any other CSS classes to add to the button. | String | optional |