Accordion

collapsible UI for multiple sections

It’s an accordion. No JavaScript required. You’ll need to import views/components at the top of your template.

 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<ul class="accordion">
<li>
<input id="accordion-a" type="checkbox" hidden />
<label for="accordion-a">{%= components.ExpandCollapse(3, ps) %} Option A</label>
<div class="bd"><div><div>
Option A!
</div></div></div>
</li>
<li>
<input id="accordion-b" type="checkbox" hidden />
<label for="accordion-b">{%= components.ExpandCollapse(3, ps) %} Option B</label>
<div class="bd"><div><div>
Option B!
</div></div></div>
</li>
<li>
<input id="accordion-b" type="checkbox" hidden />
<label for="accordion-b">{%= components.ExpandCollapse(3, ps) %} Option C (not animated)</label>
<div class="bd-no-animation">Option C!</div>
</li>
</ul>