Template:MechaButton: Difference between revisions
Template page
More actions
No edit summary |
No edit summary |
||
| (7 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
< | <includeonly><span class="mecha-button {{{type|}}} {{{icon|}}}">[[{{{link|Main Page}}}|{{{text|Button}}}]]</span></includeonly> | ||
< | |||
<noinclude>{{MechaButton/docs}}</noinclude> | |||
</ | |||
</ | |||
Latest revision as of 18:54, 21 February 2026
Docs for MechaButton
edit sourceDocumentation included within a "noinclude". Edit these docs at Template:MechaButton/docs
Creates a Mecha-styled button linking to internal or external pages.
Buttons use the global .mecha-button style and support icons and variants.
Basic usage
edit source{{MechaButton
|link=Install
|text=Install Mechanix
}}
Parameters
edit source| Parameter | Required | Description | Example |
|---|---|---|---|
| link | yes | Page name or external URL | Install |
| text | no | Button text | Install Mechanix |
| type | no | Button style variant | mecha-button-secondary |
| icon | no | Icon class | mecha-i mecha-i--rocket |
| external | no | Set to 1 for external links | 1 |
Button variants
edit sourceSecondary button
edit source{{MechaButton
|link=Development
|text=Development Guide
|type=mecha-button-secondary
}}
Button with icon
edit source{{MechaButton
|link=Install
|text=Install
|icon=mecha-i mecha-i--rocket
}}
External link
edit source{{MechaButton
|link=https://mecha.so
|text=Visit Website
|external=1
}}
Button groups
edit sourceUse with Template:MechaButtons:
{{MechaButtons|
{{MechaButton|link=Install|text=Install}}
{{MechaButton|link=Apps|text=Browse Apps|type=mecha-button-secondary}}
}}
Notes
edit source- Internal links use page names, not full URLs.
- External links require
|external=1. - Icons use the global Mecha icon system.