Vue.js | v-show directive
The v-show directive is a Vue.js directive used to toggle the display CSS property of a element with our data. If the data is true it will make it visible else it will make it invisible. First, we will create a div element with id as app and let’s apply the v-show directive to this element with data as a message. Now we will create this message by initializing a Vue instance with the data attribute containing either true or false.
Parameters: This directive accepts a single parameter which is the data.
Example 1: This example uses VueJS to show an element with v-show.
Example 2: This example uses VueJS to hide an element with v-show.