{% with id=widget.attrs.id %}<div{% if id %} id="{{ id }}"{% endif %}{% if widget.attrs.class %} class="{{ widget.attrs.class }}"{% endif %}>{% for group, options, index in widget.optgroups %}{% if group %}
    <div><label class="has-text-weight-medium">{{ group }}</label>{% endif %}<div style="display: flex; flex-direction: row; flex-wrap: wrap">{% for option in options %}<div class="mr-2" style="white-space: nowrap">
    {% include option.template_name with widget=option %}</div>{% endfor %}</div>{% if group %}
    </div>{% endif %}{% endfor %}
</div>{% endwith %}