Customize the default search block In the .theme file of my custom Drupal 8 theme, how do I customize the default search block so that I can add custom classes and also alter the input label to remove the word "search" but instead have a search icon from fontawesome?

Pretty much, I'd like the final output code to look like this:

&lt;div class="infoBar-search"&gt;
  &lt;form action="#!" class="searchForm"&gt;
    &lt;input type="search" name="sitesearch" placeholder="Search..."&gt;
    &lt;input type="submit" class="searchForm-submit fa" value="&amp;#xf002;"&gt;
  &lt;/form&gt;
&lt;/div&gt; 


Would the .theme approach be the best way to go about this? I tried altering a few template files but noticed this would affect the other forms on the site as well.
I'm sure this can be done more elegantly , but I was able to do this with a #icon_variable from the form[] to change the input suggestion. I just added side that I want the icon on the button and an extra option to ...-icon-class.html.twig etc.

1) Add a suggestion to the input

function MODULE_theme_suggestions_input_alter(array &amp;$suggestions, array $variables, $hook) {

   if (isset($variables['element']['#icon']) || isset($variables['element']['#icon-left']) || isset($variables['element']['#icon-right'])) {
         $suggestions[] = 'input__submit_icon';
         if (isset($variables['element']['#icon'])) {
           $suggestions[] = 'input__submit_icon_' . $variables['element']['#icon'];
         }
      }
   }


Then I can add/alter this on the form:

   $form['actions']['submit']['#icon-left'] = 'icon-class';


With a template like input__submit_icon.html.twig :

&lt;button {{ attributes }} &gt;
    {% if element['#icon-left'] %}
        &lt;i class="{{ element['#icon-left'] }}"&gt;&lt;/i&gt;
    {% endif %}
    {{ attributes.value }}
    {% if element['#icon-right'] %}
        &lt;i class="{{ element['#icon-right'] }}"&gt;&lt;/i&gt;
    {% endif %}
&lt;/button&gt;