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
--
-
- Try to limit the number of panels in an accordion by categorising information into smaller, digestible chucks. This will assist your users in scanning and comprehending the content. -
- Remember to structure textual content correctly in accordions, for example use heading tags where appropriate. -
HTML
- -
- <section class="qg-accordion qg-dark-accordion" aria-label="Accordion Label">
- <input type="radio" name="control" id="collapse" class="controls collapse" value="collapse" role="radio">
- <label for="collapse" class="controls">Collapse all</label>
- <span class="controls">|</span>
- <input type="radio" name="control" id="expand" class="controls expand" value="expand" role="radio">
- <label for="expand" class="controls">Expand all</label>
-
- <article>
- <input id="without-icon" type="checkbox" name="tabs" tabindex="-1" aria-controls="id-panel-content-1" aria-expanded="false" role="checkbox">
- <h3 class="acc-heading"><label for="without-icon"><span class="title">Without icon</span> <span class="subtitle">Subtitle can go here (optional)</span><span class="arrow"> <i></i></span></label></h3>
- <div class="collapsing-section" aria-hidden="true" id="id-panel-content-1">
- <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>
- </div>
- </article>
- </section>
-
- Fontawesome icon can also be used instead of image. To use the default theme remove qg-dark-accordion class.
-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="">
-
-