title: How to add and remove class of the css when a check box is checked or not in vue?
body: <p>Suppose there is a checkbox I want to add and remove the class of css style when a checkbox is checked or unchecked. Below is the code I have used:-</p>
  
  <pre><code> &lt;template&gt;
     &lt;div class="app"&gt;
       &lt;label&gt;&lt;input type="checkbox" @click= "onchange($event)"&gt;add/remove class&lt;/label&gt;
     &lt;/div&gt;
  &lt;/template&gt;
  
   &lt;script&gt;
     export default {
       methods:{
         onchange($event){
           console.log($event)
         }
      }
    }
   &lt;/script&gt;
  </code></pre>
  
  <p>How I will do my task by this that I have change my background color on checked and change the color when I unchecked the checkbox again.</p>