[Vuejs]-How to change color of html text depending on the value of a variable Vue JS

1👍

You can use conditional class.

Example:

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

Where ‘active’ is your class (text-danger or whatever it is) and isActive is the condition that will trigger that class.

Leave a comment