vue if echo class
snippet in html

vue class binding

user6487

<div v-bind:class="{ active: isActive }"></div>

vue if echo class

user5138

<div class="defaultclass" :class="condition?' conditionalclasstoappend':''"></div>