vue js ternary operator class code example
Example 1: vue conditional class
<div :class="{ 'prop-name': boolVar }"></div>
Example 2: vue inline style bind
<div v-bind:style="{ color: activeColor, fontSize: fontSize + 'px' }"></div>
<div :class="{ 'prop-name': boolVar }"></div>
<div v-bind:style="{ color: activeColor, fontSize: fontSize + 'px' }"></div>