Content related to header.
- If dot points are available
- Can go here
Form example inside accordion
Accordions display collapsible content panels for presenting information in a limited amount of space. Accordions help users see only the content they need, while everything else is easily accessible.
Usage considerations
Content related to header.
Form example inside accordion
Content related to header.
Or provide any semantic html structure
Content related to header.
Form example inside accordion
Content related to header.
Or provide any semantic html structure
HTML
<section class="qg-accordion qg-accordion-v2" aria-label="Accordion Label">
<div class="qg-acc-controls">
<button class="controls expand">Expand all</button>
<span class="controls">|</span>
<button class="controls collapse">Collapse all</button>
</div>
<article>
<button class="acc-heading qg-accordion--closed" aria-controls="accordion-default" aria-expanded="true" ><span class="accordion-label"><span class="title">Without icon</span></span></button>
<div class="collapsing-section">
<p> Content related to header. </p>
<ul>
<li>If dot points are available</li>
<li>Can go here</li>
</ul>
<p>Form example inside accordion</p>
</div>
</article>
<article>
<button class="acc-heading qg-accordion--closed" aria-controls="accordion-default" aria-expanded="true" ><img src="https://placeimg.com/20/20/nature" alt=""><span class="accordion-label"><span class="title">With icon</span> <span class="subtitle">Subtitle can go here (optional)</span></span></button>
<div class="collapsing-section ">
<h4>Heading</h4>
<p> Content related to header. </p>
<ul>
<li>If dot points are available</li>
<li>Can go here</li>
</ul>
<p>Or provide any semantic html structure</p>
<button type="button" class="qg-btn btn-default">Default</button>
<button type="button" class="qg-btn btn-primary">Primary</button>
<button type="button" class="qg-btn btn-secondary">Primary Alt</button>
<button type="button" class="qg-btn btn-link">Link</button>
</div>
</article>
</section>
Class | Usage |
---|---|
qg-dark-accordion | Dark theme |
qg-accordion-v2 | Accordion enhancements (accessibility and design). For backward compatibility accordions already in use without this new class will work as expected |
Use 'title of an accordion' or an 'ID of an accordion' to open a panel
Fontawesome icon can also be used instead of image.
Accordion without icons or images is advised best practice.
<i class="fa fa-car" aria-hidden="true"></i>
or
<img src="{{path of the image}}" alt="">