As with any HTML attribute, Vue is able to manipulate CSS classes. As with everything in Vue, this can be done in a myriad of ways ranging from attributes on the object itself to utilizing methods. We'll start off adding a class if the user is active.
Binding a CSS class is similar to other attributes. The value takes an object that can calculate logic from within the view or be abstracted out into our Vue instance. This all depends on the complexity of the operation.
First, let's add a class to the cell containing the isActive variable if the user is active:
<td v-bind:class="{ active: person.isActive }"> {{ activeStatus(person) }} </td>
The class HTML attribute is first prepended by v-bind: to let Vue know it needs ...