-1👍
✅
Like this? Example on Codesandbox
You basically want to use :class
, for example:
<div class="parent" :class="{'green': radio}">
<input type="radio" v-model="radio" :value="true"/> True
</div>
<div class="parent" :class="{'red': !radio}">
<input type="radio" v-model="radio" :value="false"/> False
</div>
You can read more about it in the official Vue documentation:
Source:stackexchange.com