uikit_components-8.x-3.1/templates/components/uikit-accordion.html.twig
templates/components/uikit-accordion.html.twig
{#
/**
* @file
* Default theme implementation for a UIkit Accordion.
*
* Available variables:
* - attributes: HTML attributes to be applied to the accordion.
* - items: An associative array containing the title and content for each
* accordion item.
*
* @see \Drupal\uikit_components\Element\UIkitAccordion
* @see template_preprocess_uikit_accordion()
* @see https://getuikit.com/docs/accordion
*
* @ingroup uikit_components_theme_render
*/
#}
{% if items %}
<ul{{ attributes }}>
{% for item in items %}
<li>
<h3 class="uk-accordion-title">{{ item.title }}</h3>
<div class="uk-accordion-content">{{ item.content }}</div>
</li>
{% endfor %}
</ul>
{% endif %}
