|
<includeonly><spandiv class="mw-collapsible {{#ifeq:{{lc:{{{state|collapsed}}}}}|expanded||mw-collapsed}}" id="mw-customcollapsible-{{{id|1}}}" style="display:inline; {{{style|}}}">
data-expandtext="{{{expandtext|more ▾}}}"
<span class="mw-collapsible-content" style="display:inline;"> ▼
data-collapsetext="{{{collapsetext|less ▴}}}"
{{{text|}}}<span class="mw-customtoggle-{{{id|1}}}" style="cursor:pointer; color:#0645ad; margin-left:0.5em; vertical-align:baseline; display:inline;">{{{collapsetext|less ▴}}}</span>
style="{{{style|}}}">
▲< spandiv class="mw-collapsible-content " style="display:inline;">
</span><span class="mw-customtoggle-{{{id|1}}} mw-collapsible {{#ifeq:{{lc:{{{state|collapsed}}}}}|expanded|mw-collapsed|}}" id="mw-customcollapsible-{{{id|1}}}-btn" style="cursor:pointer; color:#0645ad; margin-left:0.5em; vertical-align:baseline; display:inline-block;">{{{expandtext|more ▾}}}</span></includeonly><noinclude>
{{{text|}}}
</div></includeonly><noinclude>
== Usage ==
A simple collapsible block for hiding/showing content.
To ensure the buttons "glue" to the end of the text, you must provide a unique '''id''' if using this more than once on a single page.
<pre>
{{show
|text=The primary driver for the acquisition was the target's proprietary AI technology.
|id=bio1
}}
|compact=yes
</pre>
|text=This is a very long text that will span multiple lines. When it expands, the "less" button will stay right here at the end.
== Custom Labels ==
To change the "more" and "less" buttons:
<pre>
{{show
|expandtext=Read Bio
|collapsetext=Close
|text=John Doe has been the CEO since 2010...
}}
</pre>
== Parameters ==
* '''text''': The content to be hidden/shown.
* '''id''': (Required if multiple on one page) A unique name like "1", "2", "bio", etc.
* '''textexpandtext''': The contenttext for the "show" link (Defaults to "more ▾").
* '''expandtextcollapsetext''': The text for the "hide" link (Defaults to "moreless ▾▴").
* '''collapsetextstate''': DefaultsSet to "less ▴expanded" to have the text visible on page load.
* '''statestyle''': SetPass toadditional "expanded"CSS tostyles showdirectly to bythe defaultcontainer.
[[Category:Generic templates]]
</noinclude>
|