How do I attach a library to contact forms? Simple question, I just need to know how to attach a library to Drupal 8's contact forms.  I recently made a similar post for attaching a library to a view, that was accomplished by adding {{ attach_library('mytheme/mylib') }} to views-view--myview.html.twig, but doing the same to contact forms is less obvious.  If the preferred way to attach a library is through twig templates can someone please advise me on what the naming convention is for contact-form twig templates?
Enable twig debug in your develop environment, then you can see through HTML comments all theme suggestions, then create a twig file with based in what you want template.

Original post here.


  Debugging Twig templates
  
  The Twig templating engine offers a debug tool.
  
  The Drupal 8 implementation also adds an additional tool that allows
  you to locate the template that outputs the markup.
  
  Enable debugging
  
  You enable Twig Debugging in sites/default/services.yml. (If services.yml does not yet exist; copy default.services.yml and rename
  it to services.yml.)
  
  Set the debug variable to true.


parameters:
  twig.config:
    debug: true 


Just pay attention, if you not using site's default folder, use that you created.

After turn on debug, clear the cache, then you will see something like this in your HTML

&lt;!-- THEME DEBUG --&gt;
&lt;!-- THEME HOOK: 'form' --&gt;
&lt;!-- FILE NAME SUGGESTIONS:
   x form--feedback.html.twig
   * form.html.twig
--&gt;


If you need create a new name suggestion for a element, use THEME_theme_suggestions_HOOK_alter in your .theme file, and add your suggestion.

Example:

function THEME_theme_suggestions_form_alter(array &amp;$suggestions, array $variables) {
  $suggestions[] = 'form__' . $variables['element']['#form_id'];
}