How to get the type of Paragraphs entity in the parent node field? I have a "page" node with a paragraphs field field-ref-para-multi and the corresponding template field--node--field-ref-para-multi--page.html.twig.

And I have some paragraphs types that can be used in this field:

para_a

para_b

para_c

I have to place a surrounding html structure in the field depending of the paragraphs types that are used inside.

{# type a #}
&lt;div class="js-para_a"&gt;
{% if multiple %}
    {% for item in items %}
        {{item.content}}
     {% endfor %}
{% else %}
    {% for item in items %}
        {{item.content}}
    {% endfor %}
{% endif %}
&lt;/div&gt;

{# type b #}
&lt;ul class="js-para_b"&gt;
{% if multiple %}
    {% for item in items %}
        &lt;li&gt;{{item.content}}&lt;/li&gt;
     {% endfor %}
{% else %}
    {% for item in items %}
        &lt;li&gt;{{item.content}}&lt;/li&gt;
    {% endfor %}
{% endif %}
&lt;/ul&gt;


But how to get the type of the used paragraphs in the field template?
I think you can wrap each paragraphs field in any html wrapper of your choice, but you have to edit each field by modifying the appropriate field.html.twig  template file. 

In the field template suggested name, for example:

FILE NAME SUGGESTIONS:
   * field--paragraph--field-text-half--text-svg.html.twig
   x field--paragraph--field-text-half.html.twig
   * field--paragraph--text-svg.html.twig
   * field--field-text-half.html.twig
   * field--text-long.html.twig
   * field.html.twig


You will then use the template suggested name to edit the html wrapper of your choice. 

Like this :

{% if label_hidden %}
  {% if multiple %}
    &lt;div{{ attributes }}&gt;
      {% for item in items %}
        &lt;div{{ item.attributes }}&gt;{{ item.content }}&lt;/div&gt;
      {% endfor %}
    &lt;/div&gt;
  {% else %}
    {% for item in items %}
      &lt;div{{ attributes }}&gt;{{ item.content }}&lt;/div&gt; --&gt; change div to preferred  html
    {% endfor %}
  {% endif %}
{% else %}
  &lt;div{{ attributes }}&gt;
    &lt;div{{ title_attributes }}&gt;{{ label }}&lt;/div&gt;
    {% if multiple %}
      &lt;div&gt;
    {% endif %}
    {% for item in items %}
      &lt;div{{ item.attributes }}&gt;{{ item.content }}&lt;/div&gt;
    {% endfor %}
    {% if multiple %}
      &lt;/div&gt;
    {% endif %}
  &lt;/div&gt;
{% endif %}


Hope this helps :)