@appstractdk/as-accordion
v1.0.42
Published
as-accordion is a basic accordion module allowing to show and hide content based on the user clicking a bar. This package contains styling.
Downloads
3
Keywords
Readme
as-accordion
as-accordion is a basic accordion module allowing to show and hide content based on the user clicking a bar. This package contains styling.
Usage
Here is a basic HTML example with the default class names:
<div class="accordion">
<p class="accordion-item-text">Lorem ipsum dolor sit amet</p>
<span class="accordion-item-triangle"></span>
<div class="accordion-fold-container" style="max-height: 0px;">
<div class="accordion-fold">
<div class="editor-content"><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
</div>
</div>
</div>
Options
The following options could be overwritten with custom ones:
const defaultOptions = {
accordionFoldContainerSelector: '.accordion-fold-container',
accordionFoldSelector: '.accordion-fold',
accordionActiveClass: 'active'
};