Template:Collapsible
| Template documentation |
|---|
| Note: portions of the template sample may not be visible without values provided. |
| View or edit this template's documentation (edit) (about template documentation). |
| View this template's CSS styles (edit). |
Example(s)
[edit source]- Text, no heading (collapsed)
{{collapsible|Example text content 1}}gives:
Example text content 1
- Text, no heading (uncollapsed)
{{collapsible|Example text content 2|uncollapsed=y}}gives:
Example text content 2
- Text, with heading (collapsed)
{{collapsible|Example text content 3|Label}}gives:
Example text content 3
- Text, with heading (collapsed) - Custom toggle text
{{collapsible|Example text content 4|Label|expandtext=Show Content|collapsetext=Hide Content}}gives:
Example text content 4
{{collapsible|Example text content 5|Heading|expandtext=More Information|collapsetext=Less Information}}gives:
Example text content 5
Template Data
[edit source]Creates a collapsible section (div element) with "Expand" or "Collapse" toggle buttons like a table. Can be un-collapsed or have the toggle text overridden for each state. Useful for folding up larger chunks of optional text content though should not really contain multi-sectioned text. It can, however, be used multiple times in a row with <hr> or ----, to create an accordion-style set of small content blocks.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| 1 | 1 | Enter the collapsed content. | String | required |
| 2 | 2 | Enter an optional label (or header if you style bold) | String | optional |
| uncollapsed | uncollapsed | Any value un-collapses the collapsed (default) information entered.
| Boolean | optional |
| class | class | Entering a CSS class adds it to the overall div for styling. | String | optional |
| collapsetext | collapsetext | To override the collapse label, enter some text. | String | optional |
| expandtext | expandtext | To override the expand label, enter some text. | String | optional |
| style | style | To add styles, input valid CSS styles separated by semi-colons. | String | optional |