The Vue.js 2 Master Class
Plans from $25/month

This lesson is for members. Join us?

Subscribe now and get immediate access to this course, 30 more and all future Vue.js courses!

🚧 NOTICE: You are watching a Vue.js 2 lesson

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.