The default template used by the Toggles extension is simple and responsive. All patterns shown on the page support accordion functionality, which can be enabled using the data-accordion="true"
on the list element used to create the toggles.
Using the collapse:show
and collapse:hide
events described on the extension page you can update elements of the default template when toggles expand or collapse.
For a simple look, you can remove the surrounding border and horizontal padding to create flush toggles.
Toggles patterns are custom micro-templates that you can use with our Toggles extension. To have them applied when you create toggles within your article content, simply copy-and-paste the code into the bottom of your Article page template (article_page.hbs
).
You can have have the toggles behave as accoredions, with one opening at a time, by adding a data-accordion="true"
attribute to the list that you use to create the toggles. To learn how to actually create toggles within your article content and the other options available, refer to the Toggles extension page.