Add class to {{ link }} twig attribute I'm trying to apply a button class to the {{ link }} attribute in code below. 

&lt;span{{attributes}}&gt;&lt;a class="usa-button"{{ link }}&lt;/span&gt;


It displays correctly however the markup is not correct. I see an extra &lt;a="" tag. 

&lt;a class="usa-button" &lt;a="" href="http://sites.localhost/sites/default/files/Image%20styles%20for%20grid%20view_3.docx" type="application/vnd.openxmlformats-officedocument.wordprocessingml.document; length=14535"&gt;Image styles for grid view_3.docx&lt;/a&gt;


Any ideas on how to apply class cleanly?
I think your easiest approach would be to modify the field template and add a wrapping span with classes you need.

field--field-name.html.twig:

{% for item in items %}
  &lt;span{{ item.attributes.addClass('my-class') }}&gt;{{ item.content }}&lt;/span&gt;
{% endfor %}


or replace span and content with to add class directly to &lt;a&gt; tag:

&lt;a href="{{ item.content['#url']}}" class="my-class"&gt;{{ item.content['#title'] }}&lt;/a&gt;