How do I add a class to a specific input type?
Template files are available by default for each input type.


Copy the input.html.twig file and rename it input--textfield.html.twig
Put it in the folder of the theme
Clear the cache and the new template will be used for all text-field form fields
You can add &lt;input{{ attributes.addClass('input') }}/&gt;{{ children }} in that file


If you want a more customized input field, you implement hook_theme_suggestions_HOOK().

function YOUR_THEME_NAME_theme_suggestions_input_alter(array &amp;$suggestions, array $variables) {
  // To see available variables use kint().
  kint($variables);
  if ($variables['element']['#type'] == 'textfield' &amp;&amp; $variables['element']['#name'] == field__--------- ) {
    $suggestions[] = 'input__customized';
  }
}