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

Vue Router 4 for Everyone

Router Link Active Class

In this lesson, we learn how to target links for the currently visited page in order to style them differently from other links. This is common practice and provides a good user experience as it gives them more context about where they are on your site. With Vue.js, all that's needed is to provide the desired styles on the router-link-active class, and Vue Router takes care of the rest!