conditional class in vue' code example
Example 1: bind style with condition in vue
v-bind:style= "[condition ? {styleA} : {styleB}]"
Example 2: vue conditional class
<div :class="{ 'prop-name': boolVar }"></div>
v-bind:style= "[condition ? {styleA} : {styleB}]"
<div :class="{ 'prop-name': boolVar }"></div>