Answers for "v-bind class else"

3

vue class binding

<div v-bind:class="{ active: isActive }"></div>
Posted by: Guest on December-19-2019
-1

vue class binding if else

vue class binding if else
<div :class="{ 'prop-name': boolVar }"></div>
:class="darkMode ? 'dark-theme' : 'light-theme'"
If darkMode is true, we apply dark-theme as our class name. 
	Otherwise we choose light-theme.
Posted by: Guest on December-04-2020

Browse Popular Code Answers by Language