bootstrap_components_toolkit-1.0.0/templates/bootstrap-tabs.html.twig
templates/bootstrap-tabs.html.twig
{{ attach_library('bootstrap_components_toolkit/tab') }}
{% if tabs_alignment == 'vertical' %}
<div class="tabs--vertical d-md-flex align-items-start">
{% endif %}
{% if nav_items %}
{% if not nav_classes %}
{% set nav_classes = [] %}
{% endif %}
{% set nav_classes = nav_classes | merge([
tabs_alignment == 'vertical' ? 'me-md-5'
]) %}
{% include "@bootstrap_components_toolkit/bootstrap-nav.html.twig" with {
items: nav_items,
style: 'tabs',
attributes: create_attribute({ 'role' : 'tablist'}),
classes: nav_classes,
is_tabpanel: true,
alignment: tabs_alignment == 'vertical' ? 'vertical' : nav_alignment
} %}
{% endif %}
{% if tabs %}
<div class="tab-content">
{% for tab in tabs %}
<div class="tab-pane fade{% if loop.index0 == 0 %} show active{% endif %}" id="{{ tab.id }}" role="tabpanel" aria-labelledby="{{ tab.id ~ '-tab'}}">
{{ tab.content }}
</div>
{% endfor %}
</div>
{% endif %}
{% if tabs_alignment == 'vertical' %}
</div>
{% endif %}
