Add class to content field (link) I want to add a class to the &lt;a&gt; tag of a field that consists of a link and  text. (It's a field of type Link.) The name of the field is content.field_c_button_link.

In the template file, I want to add something like the following.

{{ content.field_c_button_link.0.addClass('button blue') }}


How can I add a class properly?

According to Patrick Scheffer's answer, I looked at the settings for a field where I can add extra CSS classes, but I could not find any. This is a screenshot of what I can edit in the link field.
This is a solution I found, but it isn't really handy to use... I really want a better solution, like something directly from twig templates.

function template_preprocess_field(&amp;$variables, $hook) {
  $element = $variables['element'];
  if ($element['#name'] == 'field_c_button_link') {
    $variables['items'][0]['content']['#options']['attributes']['class'][] = 'button';
  }
}