// demo is a class that is needed anyway and then boxASelected is added if true
:class="{active: boxASelected}"

// Or pass this into a computed property

computed: {
  boxAClasses() {
    return { active: this.boxASelected };
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter