element" with { context: 'field' } %}
        {% endfor %}
    </div>

    <div class="texticon add icon">
        {{ text({
            width: 'auto',
            placeholder: selectionLabel,
        }) }}
        <div class="spinner hidden"></div>
    </div>
</div>

{% set jsSettings = {
    id: id|namespaceInputId,
    name: name|namespaceInputName,
    tagGroupId: tagGroupId,
    sourceElementId: sourceElementId ?: null,
    targetSiteId: targetSiteId
} %}

{% js %}
    new Craft.TagSelectInput({{ jsSet