# vue-tree-navigation
[](https://www.npmjs.com/package/vue-tree-navigation)
[](https://github.com/J3-Tech/Vue-Tree-Navigation/actions/workflows/node.js.yml)
[](https://github.com/J3-Tech/Vue-Tree-Navigation/actions/workflows/deploy.yaml)
[](https://codecov.io/gh/J3-Tech/Vue-Tree-Navigation)
> Vue.js tree navigation with vue-router support
For more detailed information see [documentation/demo](https://vue-tree-navigation.j3-tech.com)
## Features
- unlimited number of levels
- optional [vue-router](https://router.vuejs.org/en/) support (v2.0.0 or higher)
- generate navigation items automatically from _vue-router_ routes or define them manually
- define a default open level
- auto-open a level when a corresponding URL visited
- focused on core functionality, only necessary styles included
- elements are provided with meaningful classes to make customizations comfortable (for example `NavigationItem--active`, `NavigationLevel--level-1`, `NavigationLevel--closed`)
## Example
### 1. Navigation items generated from _vue-router_ routes
Let's suppose you use _vue-router_ with the following routes definition
```javascript
const routes = [
{
name: 'Home',
path: '/',
},
{
name: 'Running',
path: '/running',
children: [
{
name: 'Barefoot',
path: 'barefoot',
},
],
},
{
name: 'Yoga',
path: '/yoga',
children: [
{
name: 'Mats',
path: 'mats',
},
{
name: 'Tops',
path: 'tops',
},
],
},
{
name: 'About',
path: '/about',
children: [
{
name: 'Career',
path: 'career',
children: [
{
name: 'Design',
path: 'design',
},
],
},
],
},
];
```
Then simply include _vue-tree-navigation_
```html