title: How to collapse/expand Razor components using Blazor syntax?
body: <p>I'm currently implementing a form to create a new user along with their respective user rights. In this form, I have about 30 different IT systems and if the user account should have the access rights for that specific IT system, I want to provide a panel to the admin where some extra information must be entered regarding that specific IT system. I want to implement this using razor components. What I have so far is the core view for my "new user form" as well as a razor component for the additional information of a specific IT system. By clicking the + button, I want the component to be visible / expand right below the IT system. That's what It looks like so far:</p>
  
  <p><a href="https://i.stack.imgur.com/9vVJJ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/9vVJJ.png" alt="enter image description here"></a></p>
  
  <p>The <strong>new user form:</strong></p>
  
  <pre><code> &lt;div class="row"&gt;
                  &lt;div class="col-sm-2 font-weight-bold"&gt;GOODWILL PKW/Smart&lt;/div&gt;
                  &lt;div class="col-sm-2"&gt;
                      &lt;label&gt;Add&lt;/label&gt;
                      &lt;input type="checkbox" /&gt;
                  &lt;/div&gt;
                  &lt;div class="col-sm-2"&gt;
                      &lt;label&gt;Change&lt;/label&gt;
                      &lt;input type="checkbox" /&gt;
                  &lt;/div&gt;
                  &lt;div class="col-sm-2"&gt;
                      &lt;label&gt;Remove&lt;/label&gt;
                      &lt;input type="checkbox" /&gt;
                  &lt;/div&gt;
                  &lt;div class="col-sm-4"&gt;                    
                      &lt;button @onclick="@collapseGoodwill"&gt;+&lt;/button&gt;
                  &lt;/div&gt;
  
              &lt;/div&gt;
              &lt;ModalGoodwillPKW &gt;&lt;/ModalGoodwillPKW&gt;
  
  @code {
  
  public void collapseGoodwill() {     
  
  
          }
  
  }
  </code></pre>
  
  <p>The <strong>component</strong>:</p>
  
  <pre><code>&lt;div class="panel panel-default border"&gt;
      &lt;div class="panel-heading alert-primary"&gt;
          &lt;h3 class="panel-title"&gt;Goodwill PKW/smart&lt;/h3&gt;
      &lt;/div&gt;
  
      &lt;div class="panel-body"&gt;
          &lt;div class="container-fluid"&gt;
              &lt;div class="row"&gt;
                  &lt;div class="col-sm-2 font-weight-bold"&gt;Profile&lt;/div&gt;
  
                  &lt;div class="col-sm-5"&gt;
                      &lt;input type="checkbox" id="CB_c" /&gt;
                      &lt;label&gt;Salesman&lt;/label&gt;
                  &lt;/div&gt;
                  &lt;div class="col-sm-5"&gt;
                      &lt;input type="checkbox" id="CB_r" /&gt;
                      &lt;label&gt;Administrator&lt;/label&gt;
                  &lt;/div&gt;                
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Normally, I would use JQuery in the "collapseGoodwill" method to add a .collapse class to this element. But since I am experimenting with Blazor, I'd like to know if there is a 100% Javascript /JQuery free way of doing this. </p>
  
  <p>Thanks!</p>