[Vuejs]-Changing style of element in Vue depending on true/false from element in api

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

Leave a comment