Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
MediaWiki help
Creopedia
Search
Search
Appearance
Log in
Personal tools
Log in
View source for Template:Button/doc
Template
Discussion
English
Read
View source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
View source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
←
Template:Button/doc
{{Documentation}} This template renders a generic button component. It is commonly used by other templates and modules. == Usage == === Target === Must contains either the <code>page</code> or <code>url</code> parameter. {|class="wikitable" |- ! Internal link | <syntaxhighlight lang="wikitext" inline>{{Button|label=Label|link=Main Page}}</syntaxhighlight> | {{Button|label=Label|link=Main Page}} |- ! External link | <syntaxhighlight lang="wikitext" inline>{{Button|label=Label|url=https://example.com}}</syntaxhighlight> | {{Button|label=Label|url=https://example.com}} |} === Action & Weight === <syntaxhighlight lang="wikitext" inline>{{Button|label=<label>|link=<wikipage>|action=<action>|weight=<weight>}}</syntaxhighlight> {|class="wikitable" |- ! !! Normal !! Primary !! Quiet |- ! Default | {{Button|label=Label|link=Main Page|action=default}} | {{Button|label=Label|link=Main Page|action=default|weight=primary}} | {{Button|label=Label|link=Main Page|action=default|weight=quiet}} |- ! Progressive | {{Button|label=Label|link=Main Page|action=progressive}} | {{Button|label=Label|link=Main Page|action=progressive|weight=primary}} | {{Button|label=Label|link=Main Page|action=progressive|weight=quiet}} |- ! Destructive | {{Button|label=Label|link=Main Page|action=destructive}} | {{Button|label=Label|link=Main Page|action=destructive|weight=primary}} | {{Button|label=Label|link=Main Page|action=destructive|weight=quiet}} |} === Size === {|class="wikitable" |- ! Size !! Wikitext !! Text button !! Icon-only button |- ! Small | <syntaxhighlight lang="wikitext" inline>{{Button|label=Label|link=Main Page|size=small}}</syntaxhighlight> | {{Button|label=Label|link=Main Page|size=small}} | {{Button|label=Label|link=Main Page|size=small|icon=CdxIconArrowNext.svg|iconOnly=true}} |- ! Medium | <syntaxhighlight lang="wikitext" inline>{{Button|label=Label|link=Main Page|size=medium}}</syntaxhighlight> | {{Button|label=Label|link=Main Page|size=medium}} | {{Button|label=Label|link=Main Page|size=medium|icon=CdxIconArrowNext.svg|iconOnly=true}} |- ! Large | <syntaxhighlight lang="wikitext" inline>{{Button|label=Label|link=Main Page|size=large}}</syntaxhighlight> | {{Button|label=Label|link=Main Page|size=large}} | {{Button|label=Label|link=Main Page|size=large|icon=CdxIconArrowNext.svg|iconOnly=true}} |} === With icon === {|class="wikitable" |- | <syntaxhighlight lang="wikitext" inline>{{Button|label=Previous|link=Main Page|icon=CdxIconArrowNext.svg}}</syntaxhighlight> | {{Button|label=Label|link=Main Page|icon=CdxIconArrowNext.svg}} |} === Icon-only button === {|class="wikitable" |- | <syntaxhighlight lang="wikitext" inline>{{Button|label=Previous|link=Main Page|icon=CdxIconArrowNext.svg|iconOnly=true}}</syntaxhighlight> | {{Button|label=Label|link=Main Page|icon=CdxIconArrowNext.svg|iconOnly=true}} |} == TemplateData == <templatedata> { "params": { "label": { "label": "Label", "description": "Label text", "type": "string", "required": true }, "link": { "label": "Page name", "description": "Page name to link to", "type": "wiki-page-name", "suggested": true }, "url": { "label": "URL", "description": "URL to link to", "type": "url", "suggested": true }, "action": { "label": "Button action", "type": "string", "suggestedvalues": [ "default", "progressive", "destructive" ], "default": "default", "suggested": true }, "weight": { "label": "Button weight", "type": "string", "suggestedvalues": [ "normal", "primary" ], "default": "normal", "suggested": true }, "size": { "label": "Button size", "type": "string", "suggestedvalues": [ "small", "medium", "large" ], "default": "medium" }, "disabled": { "label": "Disabled", "description": "Whether the button is disabled", "type": "boolean" } }, "description": "Renders a generic button component", "format": "inline" } </templatedata> <includeonly> [[Category:Templates]] </includeonly>
Templates used on this page:
Template:Button
(
view source
)
Template:Documentation
(
view source
)
Module:Arguments
(
view source
) (protected)
Module:ButtonLua
(
view source
)
Module:ButtonLua/styles.css
(
view source
)
Return to
Template:Button/doc
.