2👍
✅
You can use the class binding v-bind:class
or shorthand :class
to accomplish this.
Same goes for v-bind:style | :style
Example:
<p :class="{ 'someClass': discount, 'someotherClass': !discount }">Discount</p>
Resource: VueJS Class and Style binding
Source:stackexchange.com