Template:Expandable button
Close |
| {{{contents}}} |
This template creates a button that expands when clicked
Usage
[edit]To use this template, you must enter the parameters "text", "expand-text" or "collapse-text" (preferably text) and then enter the parameter "contents" to control the what appears when you click the button. The button is by default blue but you can control the color with the parameter "background-color".
A expandable button
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| text | text | Value of both the open and close text if they aren't entered.
| Content | suggested |
| contents | contents | The contents of the button. | Content | suggested |
| expand-text | expand-text | The text of the open text.
| Content | suggested |
| collapse-text | collapse-text | The text of the close text.
| Content | suggested |
| background-color | background-color | Color of the background of the button.
| String | suggested |
| id | id | The unique id of button. Required for using this template multiple times on the same page.
| String | suggested |
| text-color | text-color | The color of the text in the button.
| String | optional |
| style | style | Other style you would like to add. | String | optional |
| border-radius | border-radius | The roundness of the button.
| Number | optional |
| padding | padding | The padding of the button.
| Number | suggested |
| contents-top-border | contents-top-border | The styling of the border between the text and contents. | String | optional |
| text-align | text-align | The alignment of the text, expand-text and collapse-text parameters.
| String | optional |