add class to element vuejs code example
Example 1: vue class binding
<div v-bind:class="{ active: isActive }"></div>
Example 2: vue if echo class
<div class="defaultclass" :class="condition?' conditionalclasstoappend':''"></div>
Example 3: bind class
<div v-bind:class="{ active: isActive }"></div>