1. 12
    Conditionally Apply CSS Classes to Elements with v-bind in Vue
    2m

Conditionally Apply CSS Classes to Elements with v-bind in Vue

Share this video with your friends

Send Tweet

We'll see how we can add CSS classes conditionally to our HTML elements using the object syntax. We'll explore how different classes can be added atomically and that these can be built on top of a defined base class.

In this case, we'll check if our soldOut computed property is returning true and if it is we'll gray out the event image.