Well, Vue.js Directives always comes with prefix -v to indicate they are the special attributes. The v-bind directive connects the elementâs class attribute to the Vue instance. We added bootstrap for styling, but you can go without it. The template element is used to wrap the paragraphs and checks with v-directive to see more than 60 passmarks in subjects. Let’s suppose we have the code like this: el: '#input', The v-if directive in Vue-js computes a condition to be true into the DOM. There are times you need to change an elementâs CSS classes at runtime. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy, New Year Offer - Vue JS Training (1 Courses, 3 Project) Learn More, 1 Online Courses | 3 Hands-on Project | 12+ Hours | Verifiable Certificate of Completion | Lifetime Access, Node JS Training Program (3 Courses, 7 Projects), JavaScript Training Program (39 Courses, 23 Projects, 4 Quizzes), Software Development Course - All in One Bundle. backgroundColor: 'green', v-if directive v-if. new Vue({ For this article, this CSS class is also defined in the Bootstrap CSS.