2019-06-20 19:17:50 +00:00
|
|
|
{{!
|
|
|
|
A list with visibility toggled by a checkbox.
|
|
|
|
string|null class Optional CSS class for the root element.
|
|
|
|
string checkboxID CSS identifier unique to the page needed to connect label and input.
|
|
|
|
string|null toggleID Optional toggle button CSS identifier to connect label and toggle aria.
|
|
|
|
string|null toggleClass Optional toggle button CSS class.
|
2019-08-08 21:43:04 +00:00
|
|
|
string|null analyticsEventName Optional analytics event, sent element is clicked
|
2019-06-20 19:17:50 +00:00
|
|
|
string|null listClass Optional list CSS class.
|
|
|
|
string|null text Optional text and aria label for the toggle button.
|
|
|
|
array|null items Optional array of drop down list items for the unordered list.
|
|
|
|
}}
|
|
|
|
<div class="toggle-list {{class}}">
|
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
id="{{checkboxID}}"
|
|
|
|
class="toggle-list__checkbox"
|
|
|
|
role="button"
|
|
|
|
aria-labelledby="{{toggleID}}"
|
|
|
|
aria-expanded="false">
|
2019-08-08 21:43:04 +00:00
|
|
|
<label
|
|
|
|
id="{{toggleID}}"
|
|
|
|
class="toggle-list__toggle {{toggleClass}}"
|
|
|
|
for="{{checkboxID}}"
|
|
|
|
data-event-name="{{analyticsEventName}}">
|
2019-06-20 19:17:50 +00:00
|
|
|
{{text}}
|
|
|
|
</label>
|
|
|
|
<ul class="toggle-list__list {{listClass}}">
|
|
|
|
{{#items}}
|
|
|
|
{{> ToggleList/ToggleListItem}}
|
|
|
|
{{/items}}
|
|
|
|
</ul>
|
2019-08-08 21:43:04 +00:00
|
|
|
</div>
|