How do I attach a library to contact forms?
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'];
}