Template:Clickable button

From Wiktionary
Jump to navigation Jump to search

Parameter text is empty

Documentation icon Template documentation[view] [change] [history] [refresh]

This template creates a clickable button and adds nice styling to it.

Usage[change]

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&section=new&preloadtitle=I+love+your+work+because}}|text=Do something good|iconSecondary=ui-icon-heart|external=true|class=ui-button-red}}

Technical information[change]

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[change]

This is the TemplateData documentation for the template used by the new VisualEditor.

Clickable button

Template for generating a nice clickable button.

Template parameters

ParameterDescriptionTypeStatus
Link1 target

The link for the button to point to.

Stringoptional
Text2 text

The text inside the button.

Stringoptional
External3 external

Whether the link points to an external website or a wiki page.

Stringoptional
Primary icon class4 iconPrimary

The class for the primary icon.

Stringoptional
Secondary icon class5 iconSecondary

The class for the secondary icon.

Stringoptional
Classclass

Any other CSS classes to add to the button.

Stringoptional