vue class binding
snippet in html

vue conditional class

user5294

<div :class="{ 'prop-name': boolVar }"></div>

vue inline style bind

user6487

<div v-bind:style="{ color: activeColor, fontSize: fontSize + 'px' }"></div>

vue class binding

user7456

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

vue if echo class

user2710

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

vue class binding

user6407

<div v-bind:class="[{ active: isActive }, errorClass]"></div>

class binding vue

user2173

<div class="static"
  v-bind:class="{ active: isActive, 'text-danger': hasError }"
></div>