Check out example codes for "vue class binding". It will help you in understanding the concepts better.

Code Example 1

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

Code Example 2

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

Code Example 3

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

Code Example 4

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

Code Example 5

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

Code Example 6

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

Learn ReactJs, React Native from akashmittal.com