Loading…
Loading…
<includeonly><div class="hw-customtoggle" style="text-align: center; color: {{{color|#000}}}; user-select:none; cursor:pointer; margin: 0px -10px; padding: 0px 10px;">{{{text|'''[ Show / Hide ]'''}}}</div>
<div class="hw-collapsible hw-collapsed" style="margin: 0px -10px;">
{|class="wikitable" style="margin-top: 0.3rem; margin-bottom: -0.3rem; width: 100%; {{{style|}}}"</includeonly><noinclude>
== Collapse ==
Hides a block of content behind a '''[ Show / Hide ]''' toggle. Always close it with
{{Endcollapse}} — the two are a pair, and this half opens a table that the other half closes.
=== Usage ===
<pre>
{{Collapse|text="[ Roster ]"|color="#5C3928"}}
|-
| Alice || Engineer
|-
| Bob || Designer
{{Endcollapse}}
</pre>
The content between them is '''wikitable rows''' (<code>|-</code>, <code>| cell</code>) — this
template opens the <code>{|</code> for you.
=== Parameters ===
{| class="wikitable"
|-
! Name !! What it does
|-
| <code>text</code> || The toggle label. Wikitext, so <code>'''bold'''</code> works. Defaults to '''[ Show / Hide ]'''.
|-
| <code>color</code> || Colour of the toggle label. Defaults to black.
|-
| <code>style</code> || CSS on the table.
|}
=== Notes ===
* '''No ids at all.''' A toggle is paired with its panel by '''position''' — the panel is the
toggle's next sibling — so two Collapses on one page cannot collide, and there is nothing to
name. The old <code>{{{_uid}}}</code> id scheme was removed on
2026-08-07.
* '''Safe to paste inline.''' Because nothing here depends on being expanded as a template, the
markup above also works written straight onto a page. That was previously a silent trap:
<code>{{{_uid}}}</code> resolved to nothing outside a template
call, so the panel rendered and could never be opened.
* <code>class</code>, <code>divstyle</code>, <code>collapsedivstyle</code> and <code>tag</code>
were removed in v0.2.2 — nothing used them, and two of them never worked.
</noinclude>