Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Usage  





2 Examples  



2.1  Wikilinks  





2.2  Colors  





2.3  URLs  





2.4  Template data  





2.5  See also  
















Template:Clickable button






Alemannisch
ि
العربية
Arpetan

Azərbaycanca
تۆرکجه
Basa Bali

Banjar
 / Bân-lâm-gú
Беларуская
Bikol Central
Български
Bosanski
Català
Cebuano
Čeština
Chi-Chewa
Dansk
Deutsch

Ελληνικά
Español
Esperanto
Euskara
فارسی
Føroyskt
Français
Galego


  / Gõychi Konknni

ि
Hrvatski
Bahasa Hulontalo
Ilokano
Bahasa Indonesia
עברית
Jawa
Къарачай-малкъар

Қазақша
Kernowek
Kurdî
Ladin
Latina
Latviešu
ि
Македонски

مازِرونی
Bahasa Melayu

Nāhuatl


Occitan
ି


پښتو
Polski
Português
Qaraqalpaqsha
Qırımtatarca
Русский

Simple English
سنڌي
Slovenčina
Slovenščina
Словѣньскъ / 
کوردی
Српски / srpski
Suomi
Svenska


Тоҷикӣ
Türkçe
Удмурт
Українська
اردو
Vèneto
Tiếng Vit

Zazaki

Tolışi
 

Edit links
 









Template
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 




In other projects  



Wikimedia Commons
MediaWiki
Meta-Wiki
Wikifunctions
Wikinews
Wikiquote
Wikiversity
 
















Appearance
   

 





Permanently protected template

From Wikipedia, the free encyclopedia
 

(Redirected from Template:Clickable button 2)

  • {{clickb}}
  • {{CLB2}}
  • {{Click}}
  • This template styles a link like a button, using the 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= accepts blue and red, |class= accepts mw-ui-progressive and mw-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

    {{Clickable button|Main Page}}Main Page
    {{Clickable button|Main Page|Click here to visit the main page}}Click here to visit the main page
    {{Clickable button|Click here|link=no}}Click here

    Colors

    {{Clickable button|Main Page|color=blue}}Main Page
    {{Clickable button|Main Page|color=red}}Main Page
    {{Clickable button|Main Page|class=mw-ui-progressive}}Main Page
    {{Clickable button|Main Page|class=mw-ui-destructive}}Main Page

    Any other color will default to white

    URLs

    {{Clickable button|url=https://example.com}}https://example.com
    {{Clickable button|Example|url=https://example.com}}Example
    {{Clickable button|2=Example|url=https://example.com}}Example

    Template data

    Styles a link like a button, using the mediawiki.ui.button module

    Template parameters[Edit template data]

    This template prefers inline formatting of parameters.

    ParameterDescriptionTypeStatus
    Link/Label1

    Defines the page to link to, and uses that page's title as the text for the button

    Example
    Foobar
    Page namerequired
    Label2

    Defines the text that appears on the button

    Default
    the page being linked to
    Unknownsuggested
    URLurl

    Defines a web address for the button to link to

    Example
    https://www.example.com
    URLoptional
    classclass

    Defines the visual type of the button

    Suggested values
    mw-ui-progressive mw-ui-destructive
    Stringoptional
    Custom CSS stylingstyle

    Allows custom CSS styling to be applied to the button

    Default
    None
    Example
    border: 2px solid red;
    Stringoptional
    Category switchcategory

    Whether or not categories should be on

    Default
    yes
    Example
    no
    Auto value
    0
    Booleanoptional

    See also


    Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Clickable_button&oldid=1219281829"

    Categories: 
    Lua-based templates
    Wikipedia utility templates
    Wikipedia button templates
    Hidden category: 
    Wikipedia fully protected templates
     



    This page was last edited on 16 April 2024, at 20:21 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki