Learn Vue JS course Learn Javascript and Vue JS Learn VueJS course Learn VueJS Tutorial

The Vue.js Master Class

Get access to this course, 21 others, and future Vue.js courses!

Close Dropdown on Click Outside

In this lesson, we're implementing the v-click-outside directive that we made in the Custome Vue.js Directives course. We import the directive in the navbar component since we don't need it globally available. We use the directive to close the dropdown menu in the navbar.