Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:CollapseBox: Difference between revisions

Template page
Djavin novienta (talk | contribs)
Added documentation.
Change background color to design-token.
Line 1: Line 1:
<includeonly>{| class="collapsible collapsed" style="background-color:#0d2710; background-image: linear-gradient(#071709, #0d2710); border: 1px solid #287833; padding:0.2em; width:{{{width|30%}}}"
<includeonly>{| class="collapsible collapsed" style="background-color: var(--background-color-warning-subtle); border: 1px solid #287833; padding:0.2em; width:{{{width|30%}}}"
! style="text-align:left" | <span style="color:#44c055">{{{1|}}}</span>
! style="text-align: left" | <span style="color:#44c055">{{{1|}}}</span>
|-
|-
| style="font-size:90%; color:#FFFFFF" | {{{2|}}}  
| style="font-size: 90%; | {{{2|}}}  
|}</includeonly><noinclude>
|}</includeonly><noinclude>
{{documentation}}
{{documentation}}
</noinclude>
</noinclude>

Revision as of 10:48, 18 May 2025

Template documentation (for the above template, sometimes hidden or invisible)
Description
This template creates a green, expandable box that displays only a title when collapsed, and both title and text when expanded. It is collapsed by default.
Dependencies
Uses
Classes collapsible and collapsed
Syntax
{{CollapseBox|<title>|<text>|<width=>}}
Parameters
title
The title of the box. This is always visible.
text
Contents of the box, only visible when expanded.
width=
The width of the box, preferably in %. Default value is 30%. (Optional)
Sample
{{CollapseBox|New title|Text to be shown or hidden.}}
Gives...


{{CollapseBox|New title|Text to be shown or hidden.|width=70%}}
Gives...
Visit Template:CollapseBox/doc to edit this text! (How does this work?) (Refresh this text - why?)