set v-bind:class from view code example Example: v-bind class v-bind:class="{ active: isActive, 'text-danger': hasError }"