Template:Button
Appearance
This documentation is transcluded from Template:Button/doc.
This template renders a generic button component. It is commonly used by other templates and modules.
Usage
Target
Must contains either the page or url parameter.
| Internal link | {{Button|label=Label|link=Main Page}}
|
|
|---|---|---|
| External link | {{Button|label=Label|url=https://example.com}}
|
Action & Weight
{{Button|label=<label>|link=<wikipage>|action=<action>|weight=<weight>}}
| Normal | Primary | Quiet | |
|---|---|---|---|
| Default | |||
| Progressive | |||
| Destructive |
Size
| Size | Wikitext | Text button | Icon-only button |
|---|---|---|---|
| Small | {{Button|label=Label|link=Main Page|size=small}}
|
||
| Medium | {{Button|label=Label|link=Main Page|size=medium}}
|
||
| Large | {{Button|label=Label|link=Main Page|size=large}}
|
With icon
{{Button|label=Previous|link=Main Page|icon=CdxIconArrowNext.svg}}
|
Icon-only button
{{Button|label=Previous|link=Main Page|icon=CdxIconArrowNext.svg|iconOnly=true}}
|
TemplateData
Renders a generic button component
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Label | label | Label text | String | required |
| Page name | link | Page name to link to | Page name | suggested |
| URL | url | URL to link to | URL | suggested |
| Button action | action | no description
| String | suggested |
| Button weight | weight | no description
| String | suggested |
| Button size | size | no description
| String | optional |
| Disabled | disabled | Whether the button is disabled | Boolean | optional |