New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vue-tree-navigation

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-tree-navigation

Vue.js 2 tree navigation

  • 3.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
296
decreased by-33.18%
Maintainers
1
Weekly downloads
 
Created
Source

vue-tree-navigation Version Coverage Status License

Vue.js 2 tree navigation with vue-router support

For more information see documentation/demo

Features

  • unlimited number of levels
  • optional vue-router support (v2.0.0 or higher)
  • a possibility to 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)
  • external URLs support

Example

<template>
  <vue-tree-navigation :items="items" :defaultOpenLevel="1" />
</template>

<script>
  export default {
    data() {
      return {
        items: [
          { name: 'Products', children: [                       // category label
            { name: 'Shoes', route: 'shoes' }                   // /shoes
          ]},
          { name: 'About', route: 'about', children: [          // /about
            { name: 'Contact', route: 'contact', children: [    // /about/contact       
              { name: 'E-mail', element: 'email' },             // /about/contact#email
              { name: 'Phone', element: 'phone' }               // /about/contact#phone
            ]},
          ]},
          { name: 'Github', external: 'https://github.com' },   // https://github.com
        ],
      };
    },
  };
</script>

Installation

NPM

$ npm install vue-tree-navigation

main.js

import VueTreeNavigation from 'vue-tree-navigation';

Vue.use(VueTreeNavigation);

Include with a script tag

<script src="https://unpkg.com/vue-tree-navigation@3.0.0/dist/vue-tree-navigation.js"></script>

<script>
  Vue.use(VueTreeNavigation)
</script>

Example

<div id="app">
  <vue-tree-navigation :items="items" :defaultOpenLevel="1" />
</div>

<script>
  Vue.use(VueTreeNavigation)

  const app = new Vue({
    el: '#app',
    data: {
      items: [
        ...
      ],
    }
  })
</script>

Requirements

Developers

$ yarn dev

$ yarn build

$ yarn prettier
$ yarn lint

$ yarn unit
$ yarn unit --verbose

Keywords

FAQs

Package last updated on 22 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc