Template documentation

This template simulates a Codex-styled button. You can use an internal wikilink with the |link= parameter, or a full URL using the |url= parameter.

Examples

{{cdx-button|link=Example|label=Click this}} Click this
{{cdx-button|link=Example|label=Lorem|action=destructive}} Lorem
{{cdx-button|link=Example|label=Ipsum|weight=quiet}} Ipsum
{{cdx-button|link=Example|label=Foo bar|weight=primary}} Foo bar
{{cdx-button|link=Example|label=Click!|action=progressive|weight=primary}} Click!
{{cdx-button|link=Example|label=Add me|action=progressive|weight=primary|icon=add}} Add me
{{cdx-button|url=https://example.org|label=Visit example.org}} Visit example.org
{{cdx-button|link=Example|label=Disabled|disabled=1}} Disabled

Icons

This template supports Codex icons that are in mw:Category:Wikimedia Codex icons, and defined in Template:Cdx-button/styles.css.

NOTE: This uses the mask-image CSS property, which will not work in older browsers.

TemplateData

Display a Codex-formatted 'fake' button that links to a wiki page or external URL.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Wiki link targetlink

The destination of the button's link.

Page namerequired
Labellabel

The displayed button label.

Stringrequired
URLurl

A full URL to use instead of the link parameter

URLoptional
Actionaction

no description

Suggested values
default progressive destructive.
Default
default
Stringoptional
Weightweight

no description

Suggested values
normal primary quiet
Default
normal
Stringoptional
Iconicon

Which Codex icon to use

Suggested values
add alert check clock close collapse edit expand help-notice message success
Stringoptional