Template:Button: Difference between revisions

Template page
No edit summary
No edit summary
Line 15: Line 15:
"type": "string",
"type": "string",
"default": "center"
"default": "center"
},
        "text": {
"description": "The text you want the button to display",
"type": "string",
            "required": true
},
        "link": {
"description": "The URL where you want the button to link",
"type": "string",
            "required": true
},
"color": {
"description": "Choose between red, green, blue, or yellow (default: red)",
"type": "string",
"default": "red"
},
},
"top": {
"top": {
Line 26: Line 41:
"default": "0"
"default": "0"
},
},
"link": {
        "width": {
"description": "The URL where you want the button to link",
        "description": "Specify button width. Expressed in percentage points. Recommended: 20%.",
"type": "string",
             "type": "number",
             "required": true
            "default": "20"
},
        }
"color": {
}
"description": "Choose between red, green, blue, or yellow (default: red)",
"type": "string",
"default": "red"
},
"text": {
"description": "The text you want the button to display",
"type": "string",
            "required": true
}
}
}
}
</templatedata>
</templatedata>
</noinclude>
</noinclude>

Revision as of 15:43, 2 October 2023

[[{{{link}}}|{{{text}}}]]


No description.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
alignalign

Choose left, center or right. Always full-width on mobile. Defaults as center.

Default
center
Stringoptional
texttext

The text you want the button to display

Stringrequired
linklink

The URL where you want the button to link

Stringrequired
colorcolor

Choose between red, green, blue, or yellow (default: red)

Default
red
Stringoptional
toptop

Create empty space above the button (in pixels, integer only)

Default
0
Numberoptional
bottombottom

Create empty space below the button (in pixels, integer only)

Default
0
Numberoptional
widthwidth

Specify button width. Expressed in percentage points. Recommended: 20%.

Default
20
Numberoptional