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

Code Example 1

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

Code Example 2

v-bind:style= "[condition ? {styleA} : {styleB}]"

Code Example 3

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

Code Example 4

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

Code Example 5

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

Code Example 6

<figure :style="[item.main_featured ? {'background': 'url(' + item.main_featured + ') center no-repeat'} : {'background': '#FFF'}]">

Learn ReactJs, React Native from akashmittal.com