How to add an additional class to each element in the menu-local-task.html.twig template?
Create an array, ex:
{%
    set classes = [   
      is_active ? 'is-active',
      'my-second-class-name',
    ]
%}

&lt;div {{ attributes.addClass(classes) }}&gt;{{ link }}&lt;/div&gt;



Currently, the &quot;DefTabs__tabItem--active&quot; class is added to the active
link, but I need to add an additional CSS class &quot;DefTabs__tabItem&quot; to
each DIV element.

By the way, no need to repeat yourself with the naming, do this:
{%
    set classes = [   
      'DefTabs__tabItem',
      is_active ? 'active',
    ]
%}

&lt;div {{ attributes.addClass(classes) }}&gt;{{ link }}&lt;/div&gt;

Then in CSS you can target the active with .DefTabs__tabItem.active { ... }