×
Create a new article
Write your page title here:
We currently have 3,094 articles on YumeWiki. Type your article name above or click on one of the titles below and start writing!



YumeWiki
3,094Articles

Template:CollapseStart: Difference between revisions

(remove anon params + add button param + update templatedata + add sample)
(add collapsed param)
Line 1: Line 1:
<div class="mw-collapsible mw-collapsed {{{class|}}}" style="overflow:auto;"><div style="display:inline-block; margin-right:0.5em; {{{style|font-weight:bold;}}}">
<div class="mw-collapsible {{{collapsed|mw-collapsed}}} {{{class|}}}" style="overflow:auto;"><div style="display:inline-block; margin-right:0.5em; {{{style|font-weight:bold;}}}">
{{{label|{{{1|Spoilers:}}}}}}
{{{label|{{{1|Spoilers:}}}}}}
</div><div class="mw-collapsible-toggle" style="float:none; display:inline-block;">{{{button|[Show/Hide]}}}</div><div class="mw-collapsible-content" style="clear:both;"><noinclude>This text is part of the template doc. Hi! {{CollapseEnd}}
</div><div class="mw-collapsible-toggle" style="float:none; display:inline-block;">{{{button|[Show/Hide]}}}</div><div class="mw-collapsible-content" style="clear:both;"><noinclude>This text is part of the template doc. Hi! {{CollapseEnd}}
Line 35: Line 35:
"description": "CSS styles to apply to the label.",
"description": "CSS styles to apply to the label.",
"default": "font-weight:bold;",
"default": "font-weight:bold;",
"type": "line"
},
"collapsed": {
"label": "Collapsed",
"description": "Set to a blank value to prevent the section from being collapsed by default.",
"type": "line"
"type": "line"
}
}

Revision as of 18:17, 16 September 2024

Spoilers:

[Show/Hide]
This text is part of the template doc. Hi!

Used to hide content behind a collapsible section. Pair with {{CollapseEnd}}.

Parameters

Start of a collapsible section.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Labellabel 1

The text to display before the [Show/Hide] button. Supports wikitext such as italics and headers.

Default
Spoilers:
Contentsuggested
Toggle Buttonbutton

Specify what text (or template) should be used as the collapsible section toggle.

Default
[Show/Hide]
Contentoptional
Section Classclass

Any CSS classes to style the entire collapsible section.

Example
toccolours
Lineoptional
Label Stylestyle

CSS styles to apply to the label.

Default
font-weight:bold;
Lineoptional
Collapsedcollapsed

Set to a blank value to prevent the section from being collapsed by default.

Lineoptional

Sample

Want the code to this sample?

Sure

Here's how this sample was made:

{{CollapseStart|Want the code to this sample?|button={{MWButton|Sure|class=progressive}}|class=toccolours}}
Here's how this sample was made:
...
{{CollapseEnd|Sample ends here.}}
Sample ends here.