Skip to content

vue-router

The official client-side router for Vue 2 apps (end of life; Vue Router 4 is for Vue 3).

Stars
18.9k
Forks
5k
Licence
MIT
Language
JavaScript
Last update
7 months ago
Type
Library

What it is

Vue Router is a library that lets a Vue 2 web app switch between pages or views based on the URL, without reloading the whole page. The README says this version (3.x) works only with Vue 2 and has reached end of life. Newer projects should use Vue Router 4 for Vue 3, which is a separate repository.

  • Map URLs such as /about or /users/:id to Vue components in a Vue 2 single-page app
  • Maintain an existing Vue 2 app that depends on vue-router 3
  • Study the official examples in the repository to see how routing is set up

Great for

  • Maintainers of existing Vue 2 apps that already use vue-router 3
  • Developers reading or debugging legacy Vue 2 codebases
  • Teams migrating a Vue 2 app and needing to understand the current router setup

Not ideal for

  • New projects: the README says this version has reached end of life; use vuejs/router (Vue Router 4) for Vue 3
  • Projects not using Vue 2, because the README says it works only with Vue 2
  • Anyone who needs future bug fixes or security updates, since the README indicates end of life
Step-by-step guide: how to use vue-routerInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Node.js · Yarn

    Install development dependencies

    yarn

    Build dist files

    yarn build

    Serve examples at localhost:8080

    yarn dev
  2. 2

    Run it

    • Clone the repository from GitHub
    • Run yarn to install dependencies
    • Run yarn dev to serve the examples at localhost:8080
    • Open the examples in a browser to see routing in action
  3. 3

    Get the most out of it

    • Read the documentation at v3.router.vuejs.org (linked as the homepage)
    • Run yarn test to lint and run the test suite
    • Run yarn docs to serve the documentation locally
    • Check CHANGELOG.md for details on changes in each release

Downloads

Strengths

  • Official router from the Vue project, with documentation linked from the README
  • MIT licensed and widely used, with about 18,855 GitHub stars
  • Includes an examples folder and a changelog for tracking releases

Trade-offs

  • The README states this version and Vue 2 have reached end of life, so no new development is expected
  • Issues are for bug reports and feature requests only; questions go to Discord or the forum
  • Latest release is v3.6.5 and no binaries are provided, so it is installed as a library

How it compares

ProjectStarsTypeLevelUpdatedBest for
vue-router (this)18.9kLibraryintermediate7 months agoMaintainers of existing Vue 2 apps that already use vue-router 3
tiptap38.9kLibraryintermediate4 days agoDevelopers building a custom text editor into a web product
vuex28.3kLibraryintermediate2.1 years agoTeams maintaining an existing Vue app that already uses Vuex
vueuse22.4kLibrarybeginner6 days agoVue 3 developers who repeat common browser logic across projects
Vue.Draggable20.5kLibraryintermediate2.7 years agoVue 2 developers adding drag-to-reorder lists to an app
vue-admin-template20.4kLibraryintermediate2.5 years agoDevelopers starting a new internal admin panel or back-office tool in Vue

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.