v-if add class vue js code example Example: bind class <div v-bind:class="{ active: isActive }"></div>