Is there a way to provide theme name suggestion for form elements? I'm trying to look for a way to modify the markup for a form element without touching the default theme/template. Upon checking the source code, Drupal does not seem to recommend any theme suggestions for editing form elements. I have multiple views using the same field on the exposed filter. If I try to edit the form-element-label.html.twig it will affect all of the elements with the same field.   

&lt;!-- THEME DEBUG --&gt;
&lt;!-- THEME HOOK: 'form_element_label' --&gt;
&lt;!-- BEGIN OUTPUT from 'themes/iom/templates/layout/form-element-label.html.twig' --&gt;
&lt;label for="edit-field-themes-target-id" class="label"&gt;Themes&lt;/label&gt;
&lt;!-- END OUTPUT from 'themes/iom/templates/layout/form-element-label.html.twig' --&gt;
Seems you have to implement two hooks. One to add the suggestion, and one to define a template. hook_theme_suggestions_HOOK_alter and template_preprocess_form_element (aka hook_preprocess_HOOK).

/**
 * Implementation of hook_theme_suggestions_form_element_alter().
 */
function MYTHEME_theme_suggestions_form_element_alter(array &amp;$suggestions, array $variables) {
  if (\Drupal::service('path.current')-&gt;getPath() == '/user/login') {
    $suggestions[] = $variables['theme_hook_original'] . '--user-login';
  }
}

/**
 * Implementation of hook_preprocess_form_element().
 */
function MYTHEME_preprocess_form_element(&amp;$variables, $hook, &amp;$info) {
  $info['template'] = 'form-element--user-login';
}




Source: Form element template suggestion has no effect.